HaeffnerLab / IonSim.jl

a simple tool for simulating trapped ion systems
https://ionsim.org
MIT License
72 stars 17 forks source link

Use Unitful in the support of PhysicalConstants #53

Open neil-glikin opened 2 years ago

neil-glikin commented 2 years ago

In the move to split-species, I removed the PhysicalConstant nature of constants which are properties of a species (eg ion mass, level energies, etc), since I was having trouble getting PhysicalConstants to work in this context (#8). We could fix this by changing the struct so that it works in this context; is it worth it? In general, I don't really see value the PhysicalConstant struct adds if it doesn't do things like understand SI prefixes or multiply two constants give give a new one with new units, but even if it could, would this be very useful?

The main problem I want to point out is that the usage of it is currently inconsistent due to the above-mentioned issue #8 (used for constants like alpha and hbar, but now not for things like the mass of Ca40).

neil-glikin commented 2 years ago

An alternative option: https://painterqubits.github.io/Unitful.jl/stable/

marwahaha commented 2 years ago

I think it's a nice idea to switch to Unitful. Do you think we should do it now, or wait?