Differences
This shows you the differences between two versions of the page.
documentation:language_reference:objects:wavefunction:properties:complex [2016/09/25 13:53] – created Maurits W. Haverkort | documentation:language_reference:objects:wavefunction:properties:complex [2016/10/10 09:41] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Complex ====== | ||
+ | ### | ||
+ | boolean, read only | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | For a wavefunction //psi//, // | ||
+ | ### | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | We can define the functions | ||
+ | $$ | ||
+ | |\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 | ||
+ | $$ | ||
+ | |\psi\rangle = \left(\frac{1}{\sqrt{2}} a^{\dagger}_0 a^{\dagger}_1 + \frac{1}{\sqrt{2}} a^{\dagger}_0 a^{\dagger}_2 \right)|0\rangle. | ||
+ | $$ | ||
+ | ### | ||
+ | For the former // | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | NF=3 | ||
+ | NB=0 | ||
+ | psi = NewWavefunction(NF, | ||
+ | print(psi.Complex) | ||
+ | psi = NewWavefunction(NF, | ||
+ | print(psi.Complex) | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | true | ||
+ | false | ||
+ | </ | ||
+ | |||
+ | ===== Available properties ===== | ||
+ | {{indexmenu> |