Differences

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

Link to this comparison view

documentation:language_reference:objects:wavefunction:properties:n [2016/09/25 13:53] – created Maurits W. Haverkortdocumentation:language_reference:objects:wavefunction:properties:n [2016/10/10 09:41] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== N ======
  
 +###
 +unsigned integer, read only
 +###
 +
 +###
 +returns the number of determinants saved within the wavefunction.
 +###
 +
 +===== 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,
 +$$
 +which has three determinants and //psi.N// thus is equal to three.
 +###
 +
 +==== 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.N)
 +</code>
 +
 +==== Result ====
 +<file Quanty_Output>
 +3
 +</file>
 +
 +===== Available properties =====
 +{{indexmenu>.#1}}
Print/export