Table of Contents

Class WeightedWaveFunction1D

Namespace
QuantumWaves
Assembly
QuantumLibrary.dll

Represents a weighted combination of one dimensional wave functions.

public sealed class WeightedWaveFunction1D : WaveFunction1D
Inheritance
WeightedWaveFunction1D
Inherited Members

Constructors

WeightedWaveFunction1D(ComplexF[], WaveFunction1D[])

Initializes a weighted wave function from coefficients and wave functions.

public WeightedWaveFunction1D(ComplexF[] startCoefficients, WaveFunction1D[] startWaveFunctions)

Parameters

startCoefficients ComplexF[]

Initial coefficients.

startWaveFunctions WaveFunction1D[]

Initial wave functions.

Exceptions

ArgumentNullException

Thrown if startCoefficients, startWaveFunctions, or any wave function element is null.

ArgumentException

Thrown if no wave functions are provided or the array sizes do not match.

Properties

Coefficients

Gets the coefficients for each wave function.

public IReadOnlyList<ComplexF> Coefficients { get; }

Property Value

IReadOnlyList<ComplexF>

WaveFunctions

Gets the wave functions in the weighted sum.

public IReadOnlyList<WaveFunction1D> WaveFunctions { get; }

Property Value

IReadOnlyList<WaveFunction1D>

Methods

Add(ComplexF, WaveFunction1D)

Adds a wave function with its coefficient.

public void Add(ComplexF coefficient, WaveFunction1D waveFunction)

Parameters

coefficient ComplexF

Coefficient for the wave function.

waveFunction WaveFunction1D

Wave function to add.

Exceptions

ArgumentNullException

Thrown if waveFunction is null.

EvaluateRaw(float, float)

Evaluates the weighted sum at (x, t).

protected override ComplexF EvaluateRaw(float x, float t)

Parameters

x float

The position at which to evaluate the weighted wave function.

t float

The time at which to evaluate the weighted wave function.

Returns

ComplexF

The weighted sum of all component wave functions evaluated at x and t.