A small C# library for working with complex numbers and simple quantum wave functions. The library is designed to be lightweight and easy to use. It can be used for simulations, numerical experiments, or as a tool for visualization.
ComplexF- a float based complex number type.MathC- provides mathematical operations on complex numbers- Wave function abstractions (1D)
- Built-in solutions such as:
- infinite potential well,
- harmonic oscillator,
- Gaussian wave packet
Clone the repository:
git clone https://github.com/Tim355Code/QuantumWavesCSharp.gitThen include the project in your C# solution.
using QuantumWaves;
using CMath;
ComplexF z = 2f + ComplexF.I * 3f;
float magnitude = MathC.Abs(z);
ComplexF conjugate = z.Conjugate;
// Example wave function
var psi = new SimpleWaveFunction1D((x, t) =>
{
return MathC.Exp(ComplexF.I * x);
}, FloatRange.Infinite, ComplexF.One); // defined over (-∞, ∞)
float probability = psi.ProbabilityDensity(1.0f, 0.0f);See the rest here
cd src
dotnet test- Three dimensional wave function abstractions
- Unity visualization examples