Differences

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

Link to this comparison view

documentation:language_reference:objects:operator:properties:complex [2016/09/25 13:55] – created Maurits W. Haverkortdocumentation:language_reference:objects:operator:properties:complex [2016/10/10 09:41] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Complex ======
  
 +###
 +boolean, read-only.
 +###
 +
 +###
 +For an operator //O//, //O.Complex// returns a boolean (//true// or //false//) stating if the operator contains complex numbers or not.
 +###
 +
 +===== Example =====
 +
 +###
 +We define:
 +$$O=3.4+1.2a^{\dagger}_{0}\,a^{\phantom{\dagger}}_{0}+(2.5+I)a^{\dagger}_{1}\,a^{\phantom{\dagger}}_{2},$$
 +and 
 +$$O=3.4+1.2a^{\dagger}_{0}\,a^{\phantom{\dagger}}_{0}+(2.5)a^{\dagger}_{1}\,a^{\phantom{\dagger}}_{2},$$
 +and print for each of these operators if they are complex or not. (true for the first case, false for the second case).
 +###
 +
 +==== Input ====
 +<code Quanty Example.Quanty>
 +NF=3
 +NB=0
 +O = NewOperator(NF,NB,{{3.4},{0,-0,1.2},{1,-2,2.5+I}})
 +print(O.Complex)
 +O = NewOperator(NF,NB,{{3.4},{0,-0,1.2},{1,-2,2.5}})
 +print(O.Complex)
 +</code>
 +
 +==== Result ====
 +<file Quanty_Output>
 +true
 +false
 +</file>
 +
 +===== Available properties =====
 +{{indexmenu>.#1}}
Print/export