Loading [MathJax]/jax/output/CommonHTML/jax.js

Normalize

for a wavefunction psi the method Normalize() will change the overall prefactor of the wavefunction such that ψ|ψ=1.

Example

We can define the following function: |ψ=(a0a1+a0a2+(1+I)a1a2)|0. after normalization it becomes |ψ=(14a0a1+14a0a2+(1+I)14a1a2)|0.

Input

Example.Quanty
NF=3
NB=0
psi = NewWavefunction(NF, NB, {{"110",1},{"101",1},{"011",(1+I)}})
print(psi)
print("The norm of psi is ",psi*psi)
psi.Normalize()
print(psi)
print("The norm of psi is ",psi*psi)

Result

WaveFunction: Wave Function
QComplex         =          1 (Real==0 or Complex==1)
N                =          3 (Number of basis functions used to discribe psi)
NFermionic modes =          3 (Number of fermions in the one particle basis)
NBosonic modes   =          0 (Number of bosons in the one particle basis)
 
#      pre-factor             +I  pre-factor         Determinant
   1   1.000000000000E+00         0.000000000000E+00       110
   2   1.000000000000E+00         0.000000000000E+00       101
   3   1.000000000000E+00         1.000000000000E+00       011
 
 
The norm of psi is 	4
 
WaveFunction: Wave Function
QComplex         =          1 (Real==0 or Complex==1)
N                =          3 (Number of basis functions used to discribe psi)
NFermionic modes =          3 (Number of fermions in the one particle basis)
NBosonic modes   =          0 (Number of bosons in the one particle basis)
 
#      pre-factor             +I  pre-factor         Determinant
   1   5.000000000000E-01         0.000000000000E+00       110
   2   5.000000000000E-01         0.000000000000E+00       101
   3   5.000000000000E-01         5.000000000000E-01       011
 
 
The norm of psi is 	1

Available methods

Print/export