Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:language_reference:objects:wavefunction:properties:nbitskey [2016/09/25 13:54] – created Maurits W. Haverkort | documentation:language_reference:objects:wavefunction:properties:nbitskey [2023/11/09 14:38] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== NBitsKey ====== | ||
+ | ### | ||
+ | unsigned integer, read and write | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | Integer representing the size of the Hash key (//size// = 2< | ||
+ | ### | ||
+ | |||
+ | ===== 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. | ||
+ | $$ | ||
+ | In order to get some information on the internal representation of this function we can use the Print method including the option // | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | If we reduce the hash table from 2< | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | NF=3 | ||
+ | NB=0 | ||
+ | psi = NewWavefunction(NF, | ||
+ | psi.Print({{" | ||
+ | psi.NBitsKey=1 | ||
+ | psi.Print({{" | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | Full printout of WaveFunction: | ||
+ | |||
+ | Genneral settings | ||
+ | QComplex | ||
+ | N | ||
+ | NBlok | ||
+ | NFermion | ||
+ | NBoson | ||
+ | NWord | ||
+ | NBitsKey | ||
+ | |||
+ | Pointer positions (addresses) | ||
+ | **ValueRe | ||
+ | **ValueIm | ||
+ | **Next | ||
+ | **Determinant = 0x101c59ff0 | ||
+ | BlokNr. | ||
+ | *ValueRe | ||
+ | *ValueIm | ||
+ | *Next = 0x101ca0000 | ||
+ | *Determinant | ||
+ | |||
+ | Non-zero elements of Hash Table | ||
+ | i= 13917 , key= 2 | ||
+ | i= 29407 , key= 3 | ||
+ | i= 48988 , key= 1 | ||
+ | |||
+ | pre-factor | ||
+ | 5.000000000000E-01 | ||
+ | 5.000000000000E-01 | ||
+ | 5.000000000000E-01 | ||
+ | |||
+ | |||
+ | Full printout of WaveFunction: | ||
+ | |||
+ | Genneral settings | ||
+ | QComplex | ||
+ | N | ||
+ | NBlok | ||
+ | NFermion | ||
+ | NBoson | ||
+ | NWord | ||
+ | NBitsKey | ||
+ | |||
+ | Pointer positions (addresses) | ||
+ | **ValueRe | ||
+ | **ValueIm | ||
+ | **Next | ||
+ | **Determinant = 0x101cd1ff0 | ||
+ | BlokNr. | ||
+ | *ValueRe | ||
+ | *ValueIm | ||
+ | *Next = 0x101ca0000 | ||
+ | *Determinant | ||
+ | |||
+ | Non-zero elements of Hash Table | ||
+ | i= 0 , key= 1 | ||
+ | i= 1 , key= 2 | ||
+ | |||
+ | pre-factor | ||
+ | 5.000000000000E-01 | ||
+ | 5.000000000000E-01 | ||
+ | 5.000000000000E-01 | ||
+ | </ | ||
+ | |||
+ | ===== Available properties ===== | ||
+ | {{indexmenu> |