Skip to content

Tim355Code/QuantumWavesCSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuantumWavesCSharp .NET Standard

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.

Features

  • 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

Installation

Clone the repository:

git clone https://github.com/Tim355Code/QuantumWavesCSharp.git

Then include the project in your C# solution.


Documentation

Example

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

Running tests

cd src
dotnet test

Roadmap

  • Three dimensional wave function abstractions
  • Unity visualization examples

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors