https://github.com/masonprotter/conjugates.jl
Goofy physics notation
https://github.com/masonprotter/conjugates.jl
Last synced: 6 days ago
JSON representation
Goofy physics notation
- Host: GitHub
- URL: https://github.com/masonprotter/conjugates.jl
- Owner: MasonProtter
- License: mit
- Created: 2020-04-02T01:37:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-07T16:47:09.000Z (almost 6 years ago)
- Last Synced: 2025-02-22T07:35:29.285Z (11 months ago)
- Language: Julia
- Size: 1010 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+STARTUP: inlineimages
* Conjugates.jl
Conjugates is available on the general registry. To install, simply do
#+BEGIN_SRC julia
pkg> add Conjugates
#+END_SRC
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
[[file:assets/meme.png]]
+ Meme credit to Eric Hanson on the [[https://julialang.zulipchat.com][Julia Zulip]]