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

Complex

boolean, read only

For a wavefunction psi, psi.Complex returns a boolean (true or false) stating if the wavefunction contains complex numbers or not.

Example

We can define the functions |ψ=(14a0a1+14a0a2+(1+I)14a1a2)|0, and |ψ=(12a0a1+12a0a2)|0.

For the former psi.Complex() is true for the later psi.Complex() is false

Input

Example.Quanty
NF=3
NB=0
psi = NewWavefunction(NF, NB, {{"110",sqrt(1/4)},{"101",sqrt(1/4)},{"011",(1+I)*sqrt(1/4)}})
print(psi.Complex)
psi = NewWavefunction(NF, NB, {{"110",sqrt(1/2)},{"101",sqrt(1/2)}})
print(psi.Complex)

Result

true
false

Available properties

Print/export