Both sides previous revisionPrevious revisionNext revision | Previous revision |
documentation:language_reference:objects:responsefunction:functions:new [2024/12/30 09:46] – Maurits W. Haverkort | documentation:language_reference:objects:responsefunction:functions:new [2025/08/08 11:42] (current) – Micheangelo Tagliavini |
---|
{{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 | 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 | * "type" a string equal to "ListOfPoles", "Tri", "And", or "Nat" defining the type used for the internal storage of a response functoin |
* "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$. | * "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. | * 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. |
| |
### | ### |
| |
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") |