#+STARTUP: inlineimages

  • Conjugates.jl

Conjugates.jl is a simple little utility for doing algebraic operations between an object and its 'conjugate', either Hermitian conjugate or transpose. Conjugates.jl exports hc, standing for Hermitian conjugate and tp, standing for transpose which act like algebraic objects

#+BEGIN_SRC julia julia> using Conjugates

julia> (1 + im) + hc 2

julia> randn(ComplexF64, 3, 3) + hc 3×3 Hermitian{Complex{Float64},Array{Complex{Float64},2}}: 0.86551+0.0im 1.38105+0.506667im -0.761315-0.211322im 1.38105-0.506667im 0.826828+0.0im -0.764402-0.579842im -0.761315+0.211322im -0.764402+0.579842im -0.629772+0.0im

julia> randn(ComplexF64, 3, 3) - hc 3×3 Array{Complex{Float64},2}: 0.0-2.32902im 1.0509+0.968614im 0.899756+1.20646im -1.0509+0.968614im 0.0+0.235916im -0.554544+0.872074im -0.899756+1.20646im 0.554544+0.872074im 0.0+1.15158im

julia> randn(ComplexF64, 3, 3) * tp 3×3 Symmetric{Complex{Float64},Array{Complex{Float64},2}}: 2.43339+0.0im -1.48393-0.247791im 0.0867097+0.53651im -1.48393-0.247791im 1.38745+0.0im 0.0606936-0.470711im 0.0867097+0.53651im 0.0606936-0.470711im 2.14239+0.0im #+END_SRC


  • Meme credit to Eric Hanson on the [[https://julialang.zulipchat.com][Julia Zulip]]