Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:language_reference:objects:responsefunction:functions:new [2024/12/22 21:00] Maurits W. Haverkortdocumentation:language_reference:objects:responsefunction:functions:new [2025/08/08 11:42] (current) Micheangelo Tagliavini
Line 1: Line 1:
 {{indexmenu_n>999}} {{indexmenu_n>999}}
-====== New ======+====== ResponseFunction.New ======
  
 ### ###
 +
 ResponseFunction.New(Table) creates a new response function object according to the values in Table. Response functions can be of 4 different types (ListOfPoles, Tri, And, or Nat) and single-valued or matrix-valued. Below 8 examples for creating each of these response functions by hand at some arbitrary values. ResponseFunction.New(Table) creates a new response function object according to the values in Table. Response functions can be of 4 different types (ListOfPoles, Tri, And, or Nat) and single-valued or matrix-valued. Below 8 examples for creating each of these response functions by hand at some arbitrary values.
 +
 +###
 +
 +###
 +
 +The input table contains the elements
 +  * "type" a string equal to "ListOfPoles", "Tri", "And", or "Nat" defining the type used for the internal storage of a response functoin
 +  * "name" an arbitrary string used to recognise the response function
 +  * "mu" a double giving the chemical potential. We highly recommend to shift the energy scale such that $\mu=0$. Documentation for the behaviour of several functions at finite chemical potential, $\mu$ is still missing. You can always shift the chemical potential to zero by shifting the onsite energy of all orbitals by $-\mu$.
 +  * Depending on the type lists of doubles, matrices, or complex matrices $A$ and $B$. Each section below starts by defining $G(\omega,\Gamma)$ in terms of $A$'s and $B$'s, the input below uses these variables. We use capital font for matrices and small font for numbers. Note that the matrices $A$ and $B$ must fulfil several conditions for the response function to be physical. Only physical response functions can be transformed between all types as unitary transformations.
 +
 ### ###
  
Line 45: Line 57:
 a3 = 1 a3 = 1
 B1s = Matrix.New( {{1,1,3},{1,5,6},{3,6,9}} ) B1s = Matrix.New( {{1,1,3},{1,5,6},{3,6,9}} )
-B1 = B1s * B1s+B1 = B1s * B1s--the B matrices have to be hermitian to ensure H to be hermitian
 B2s = Matrix.New( {{2,0,3},{0,5,6},{3,6,9}} ) B2s = Matrix.New( {{2,0,3},{0,5,6},{3,6,9}} )
-B2 = B2s * B2s+B2 = B2s * B2s--the B matrices have to be hermitian to ensure H to be hermitian
 B3s = Matrix.New( {{3,0,3},{0,5,6},{3,6,9}} ) B3s = Matrix.New( {{3,0,3},{0,5,6},{3,6,9}} )
-B3 = B3s * B3s+B3 = B3s * B3s--the B matrices have to be hermitian to ensure H to be hermitian
 G = ResponseFunction.New( { {A0,a1,a2,a3}, {B1,B2,B3}, mu=0, type="ListOfPoles", name="ML"} ) G = ResponseFunction.New( { {A0,a1,a2,a3}, {B1,B2,B3}, mu=0, type="ListOfPoles", name="ML"} )
 print("The resposne function definition is") print("The resposne function definition is")
Print/export