Differences

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

Link to this comparison view

Next revision
Previous revision
documentation:language_reference:functions:operatortomatrix [2018/06/21 15:22] – created Simon Heinzedocumentation:language_reference:functions:operatortomatrix [2025/01/06 15:01] (current) Maurits W. Haverkort
Line 2: Line 2:
  
 ### ###
-alligned paragraph text+M = OperatorToMatrix(H, ...), takes operator $H$ and returns a matrix representation of this operator $M$. Possible options are 
 +  * M = OperatorToMatrix(H) 
 +  * M = OperatorToMatrix(H,rho) 
 +  * M = OperatorToMatrix(H,psi) 
 +  * M = OperatorToMatrix(H,{psi_1,...,psi_n}) 
 +with rho a density matrix and psi a wave-function.
 ### ###
  
-===== Input =====+### 
 +For the case there is no density matrix or state given the operator returned is given by the one particle part of $H$. The dimension of $M$ is $H.NF$. 
 +###
  
-  * bla : Integer +### 
-  * bla2 : Real +For the case there is a density matrix given as second input the matrix $M$ is given by a mean-field approximated version of $H$. The dimension of $M$ is $H.NF$ and $H.NF$ must be equal to $psi.NF$.  
- +###
-===== Output ===== +
- +
-  * bla : real +
- +
-===== Example =====+
  
 ### ###
-description text+For the case there is a single state $psi$ given as second input the matrix $M$ is given as an operator on the single Slater determinant basis used for $psi$. The dimension of $M$ is $psi.N$.
 ### ###
  
-==== Input ==== +### 
-<code Quanty Example.Quanty> +For the case there is a table of states given as second input the matrix $M$ is given by the elements $M_{i,j} \langle  
--- some example code +\psi_i | H | \psi_j \rangle$. In this case the dimension of $M$ is $n$ with $n$ the length of the table of states
-</code>+###
  
-==== Result ==== 
-<file Quanty_Output> 
-text produced as output 
-</file> 
  
 ===== Table of contents ===== ===== Table of contents =====
 {{indexmenu>.#1}} {{indexmenu>.#1}}
  
Print/export