Differences
This shows you the differences between two versions of the page.
documentation:language_reference:objects:wavefunction:properties:name [2016/09/25 13:54] – created Maurits W. Haverkort | documentation:language_reference:objects:wavefunction:properties:name [2016/10/10 09:41] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Name ====== | ||
+ | ### | ||
+ | string, read and write. | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | A string representing the name of the wavefunction. The name of the wavefunction is printed during print statements and error messages. Note that the name of the wavefunction is not the same as the variable name that stores the wavefunction. | ||
+ | ### | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | We define the function: | ||
+ | $$ | ||
+ | |\psi\rangle = \left(\frac{1}{\sqrt{4}} a^{\dagger}_0 a^{\dagger}_1 + \frac{1}{\sqrt{4}} a^{\dagger}_0 a^{\dagger}_2 + (1+I)\frac{1}{\sqrt{4}} a^{\dagger}_1 a^{\dagger}_2 \right)|0\rangle, | ||
+ | $$ | ||
+ | and print the name of this wavefunction. (standard name of wavefunctions is “Wavefunction”). Next we change the name and print the full wavefunction. | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | NF=3 | ||
+ | NB=0 | ||
+ | psi = NewWavefunction(NF, | ||
+ | print(psi.Name) | ||
+ | psi.Name=" | ||
+ | print(psi) | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | Wave Function | ||
+ | |||
+ | WaveFunction: | ||
+ | QComplex | ||
+ | N = 3 (Number of basis functions used to discribe psi) | ||
+ | NFermionic modes = 3 (Number of fermions in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | # pre-factor | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ===== Available properties ===== | ||
+ | {{indexmenu> |