Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
qpe::anonymous_namespace{boundstates1d.cpp} Namespace Reference

Functions

bool finitePositive (double value) noexcept
 Performs finite positive.
 
bool isPowerOfTwo (std::size_t value) noexcept
 Returns whether power of two.
 
void fft1D (std::vector< std::complex< double > > &data, bool inverse)
 Performs fft1 d.
 
double weightedNorm (const std::vector< std::complex< double > > &v, double dx)
 Performs weighted norm.
 
bool normalize (std::vector< std::complex< double > > &v, double dx)
 Returns normalize.
 
std::complex< double > innerProduct (const std::vector< std::complex< double > > &a, const std::vector< std::complex< double > > &b, double dx)
 
bool orthonormalize (std::vector< std::complex< double > > &v, const std::vector< std::vector< std::complex< double > > > &basis, double dx)
 Performs orthonormalize.
 
std::uint32_t nextRandom (std::uint32_t &state) noexcept
 
std::vector< std::complex< double > > makeTrial (std::size_t count, const std::vector< double > &potential, double vMin, int stateIndex)
 
std::vector< double > spectralKinetic (std::size_t count, double dx, double mass, double hbar)
 
double expectationEnergy (const std::vector< std::complex< double > > &psi, const std::vector< double > &potential, const std::vector< double > &kinetic, double dx)
 Performs expectation energy.
 
int countNodes (const std::vector< float > &amplitude)
 Returns count nodes.
 
double edgeMean (const std::vector< double > &values, bool left)
 Performs edge mean.
 
bool finiteVector (const std::vector< double > &values) noexcept
 Performs finite vector.
 

Variables

constexpr double kPi = 3.141592653589793238462643383279502884
 

Function Documentation

◆ countNodes()

int qpe::anonymous_namespace{boundstates1d.cpp}::countNodes ( const std::vector< float > & amplitude)

Returns count nodes.

Parameters
amplitudeThe amplitude value used by the operation.

Definition at line 247 of file boundstates1d.cpp.

References countNodes().

Referenced by countNodes().

◆ edgeMean()

double qpe::anonymous_namespace{boundstates1d.cpp}::edgeMean ( const std::vector< double > & values,
bool left )

Performs edge mean.

Parameters
valuesThe values value used by the operation.
leftThe left value used by the operation.

Definition at line 277 of file boundstates1d.cpp.

References edgeMean().

Referenced by edgeMean().

◆ expectationEnergy()

double qpe::anonymous_namespace{boundstates1d.cpp}::expectationEnergy ( const std::vector< std::complex< double > > & psi,
const std::vector< double > & potential,
const std::vector< double > & kinetic,
double dx )

Performs expectation energy.

Parameters
psiThe psi value used by the operation.
potentialPotential field used by the operation.
kineticThe kinetic value used by the operation.
dxThe dx value used by the operation.

Definition at line 223 of file boundstates1d.cpp.

References expectationEnergy(), and fft1D().

Referenced by expectationEnergy().

◆ fft1D()

void qpe::anonymous_namespace{boundstates1d.cpp}::fft1D ( std::vector< std::complex< double > > & data,
bool inverse )

Performs fft1 d.

Parameters
dataThe data value used by the operation.
inverseThe inverse value used by the operation.

Definition at line 52 of file boundstates1d.cpp.

References fft1D(), and isPowerOfTwo().

Referenced by expectationEnergy(), and fft1D().

◆ finitePositive()

bool qpe::anonymous_namespace{boundstates1d.cpp}::finitePositive ( double value)
noexcept

Performs finite positive.

Parameters
valueValue to assign or evaluate.

Definition at line 33 of file boundstates1d.cpp.

◆ finiteVector()

bool qpe::anonymous_namespace{boundstates1d.cpp}::finiteVector ( const std::vector< double > & values)
noexcept

Performs finite vector.

Parameters
valuesThe values value used by the operation.

Definition at line 300 of file boundstates1d.cpp.

References finiteVector().

Referenced by finiteVector().

◆ innerProduct()

std::complex< double > qpe::anonymous_namespace{boundstates1d.cpp}::innerProduct ( const std::vector< std::complex< double > > & a,
const std::vector< std::complex< double > > & b,
double dx )

Definition at line 129 of file boundstates1d.cpp.

References innerProduct().

Referenced by innerProduct(), and orthonormalize().

◆ isPowerOfTwo()

bool qpe::anonymous_namespace{boundstates1d.cpp}::isPowerOfTwo ( std::size_t value)
noexcept

Returns whether power of two.

Parameters
valueValue to assign or evaluate.

Definition at line 42 of file boundstates1d.cpp.

References isPowerOfTwo().

Referenced by fft1D(), and isPowerOfTwo().

◆ makeTrial()

std::vector< std::complex< double > > qpe::anonymous_namespace{boundstates1d.cpp}::makeTrial ( std::size_t count,
const std::vector< double > & potential,
double vMin,
int stateIndex )

Definition at line 172 of file boundstates1d.cpp.

References makeTrial(), and nextRandom().

Referenced by makeTrial().

◆ nextRandom()

std::uint32_t qpe::anonymous_namespace{boundstates1d.cpp}::nextRandom ( std::uint32_t & state)
noexcept

Definition at line 162 of file boundstates1d.cpp.

References nextRandom().

Referenced by makeTrial(), and nextRandom().

◆ normalize()

bool qpe::anonymous_namespace{boundstates1d.cpp}::normalize ( std::vector< std::complex< double > > & v,
double dx )

Returns normalize.

Parameters
vThe v value used by the operation.
dxThe dx value used by the operation.

Definition at line 116 of file boundstates1d.cpp.

References normalize(), and weightedNorm().

Referenced by normalize(), and orthonormalize().

◆ orthonormalize()

bool qpe::anonymous_namespace{boundstates1d.cpp}::orthonormalize ( std::vector< std::complex< double > > & v,
const std::vector< std::vector< std::complex< double > > > & basis,
double dx )

Performs orthonormalize.

Parameters
vThe v value used by the operation.
basisThe basis value used by the operation.
dxThe dx value used by the operation.

Definition at line 146 of file boundstates1d.cpp.

References innerProduct(), normalize(), and orthonormalize().

Referenced by orthonormalize().

◆ spectralKinetic()

std::vector< double > qpe::anonymous_namespace{boundstates1d.cpp}::spectralKinetic ( std::size_t count,
double dx,
double mass,
double hbar )

Definition at line 199 of file boundstates1d.cpp.

References spectralKinetic().

Referenced by spectralKinetic().

◆ weightedNorm()

double qpe::anonymous_namespace{boundstates1d.cpp}::weightedNorm ( const std::vector< std::complex< double > > & v,
double dx )

Performs weighted norm.

Parameters
vThe v value used by the operation.
dxThe dx value used by the operation.

Definition at line 102 of file boundstates1d.cpp.

References weightedNorm().

Referenced by normalize(), and weightedNorm().

Variable Documentation

◆ kPi

double qpe::anonymous_namespace{boundstates1d.cpp}::kPi = 3.141592653589793238462643383279502884
constexpr

Definition at line 27 of file boundstates1d.cpp.