Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:language_reference:objects:wavefunction:properties:nb [2016/09/25 13:54] – created Maurits W. Haverkortdocumentation:language_reference:objects:wavefunction:properties:nb [2016/10/10 09:41] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== NB ======
  
 +###
 +unsigned integer, read and write
 +###
 +
 +###
 +**Current version does not suport bosons, i.e. NB must always be //0//.**
 +###
 +
 +###
 +An integer representing the number of Bosons in the basis. For wavefunction //psi//, index //0// to //psi.NF-1// refers to Fermions, index //psi.NF// to //psi.NF+O.NB-1// refers to Bosons. Changing this number changes the wavefunction. If the new number of Bosons is smaller than the old number all modes referring to Bosons larger than //NB-1// will be removed from the determinants.
 +###
 +
 +===== Example =====
 +
 +###
 +We can 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,
 +$$
 +changing the number of bosons in the basis from 0 to 2 currently results in an error.
 +###
 +
 +==== Input ====
 +<code Quanty 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.NB)
 +psi.NB=2
 +</code>
 +
 +==== Result ====
 +<file Quanty_Output>
 +0
 +Error while executing the script:
 +/Users/haverkort/Documents/Quanty/Debuging/xcode.lua:9: Current version does not suport Bosons
 +</file>
 +
 +===== Available properties =====
 +{{indexmenu>.#1}}
Print/export