Differences
This shows you the differences between two versions of the page.
| 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 [2026/11/13 07:53] (current) – Maurits W. Haverkort | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ### | ### | ||
| - | ResponseFunction.New(Table) creates a new response function object according to the values in Table. Response functions can be of 4 different types (ListOfPoles, | + | |
| + | ResponseFunction.New(Table) creates a new response function object according to the values in Table. Response functions can be of 5 different types (ListOfPoles, | ||
| ### | ### | ||
| ### | ### | ||
| + | |||
| The input table contains the elements | The input table contains the elements | ||
| - | * " | + | * " |
| * " | * " | ||
| * " | * " | ||
| * Depending on the type lists of doubles, matrices, or complex matrices $A$ and $B$. Each section below starts by defining $G(\omega, | * Depending on the type lists of doubles, matrices, or complex matrices $A$ and $B$. Each section below starts by defining $G(\omega, | ||
| + | |||
| ### | ### | ||
| Line 53: | Line 57: | ||
| a3 = 1 | a3 = 1 | ||
| B1s = Matrix.New( {{1, | B1s = Matrix.New( {{1, | ||
| - | B1 = B1s * B1s | + | B1 = B1s * B1s--the B matrices have to be hermitian to ensure H to be hermitian |
| B2s = Matrix.New( {{2, | B2s = Matrix.New( {{2, | ||
| - | B2 = B2s * B2s | + | B2 = B2s * B2s--the B matrices have to be hermitian to ensure H to be hermitian |
| B3s = Matrix.New( {{3, | B3s = Matrix.New( {{3, | ||
| - | B3 = B3s * B3s | + | B3 = B3s * B3s--the B matrices have to be hermitian to ensure H to be hermitian |
| G = ResponseFunction.New( { {A0, | G = ResponseFunction.New( { {A0, | ||
| print(" | print(" | ||
| Line 329: | Line 333: | ||
| ==== Matrix valued functions ==== | ==== Matrix valued functions ==== | ||
| <code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
| - | -- some example code | + | Zero = Matrix.New( {{0, |
| + | acon = {Zero, Matrix.New( {{1, | ||
| + | bcon = {Matrix.New( {{0.6, | ||
| + | Gcon = ResponseFunction.New( {acon, | ||
| + | aval = {Zero, Matrix.New( {{-1, | ||
| + | bval = {Matrix.New( {{0.5, | ||
| + | Gval = ResponseFunction.New( {aval, | ||
| + | a0 = Zero | ||
| + | b0 = Matrix.New( {{1, | ||
| + | G = ResponseFunction.New( {{a0, | ||
| + | print(" | ||
| + | print(G) | ||
| + | omega = 1.1 | ||
| + | Gamma = 0.001 | ||
| + | print() | ||
| + | print(" | ||
| + | print(G(omega, | ||
| </ | </ | ||
| + | Generates the output | ||
| + | <file Quanty_Output> | ||
| + | The response function definition is | ||
| + | { { { { 0 , 0 } , | ||
| + | { 0 , 0 } } , | ||
| + | { { 1 , 0 } , | ||
| + | { 0 , 1 } } } , | ||
| + | val = { { { { 0 , 0 } , | ||
| + | { 0 , 0 } } , | ||
| + | { { -1 , 0.3 } , | ||
| + | { 0.3 , -1.2 } } , | ||
| + | { { -2 , 0 } , | ||
| + | { 0 , -2 } } } , | ||
| + | { { { 0.5 , 0 } , | ||
| + | { 0 , 0.7 } } , | ||
| + | { { 0.4 , 0.1 } , | ||
| + | { 0.1 , 0.4 } } } , | ||
| + | BlockSize = { 2 , 2 , 2 } , | ||
| + | mu = 0 , | ||
| + | name = , | ||
| + | type = Tri } , | ||
| + | mu = 0 , | ||
| + | name = MN , | ||
| + | epsilon = 2.2204460492503e-13 , | ||
| + | con = { { { { 0 , 0 } , | ||
| + | { 0 , 0 } } , | ||
| + | { { 1 , 0.2 } , | ||
| + | { 0.2 , 1.5 } } , | ||
| + | { { 2 , 0 } , | ||
| + | { 0 , 2 } } } , | ||
| + | { { { 0.6 , 0.1 } , | ||
| + | { 0.1 , 0.4 } } , | ||
| + | { { 0.5 , 0 } , | ||
| + | { 0 , 0.5 } } } , | ||
| + | BlockSize = { 2 , 2 , 2 } , | ||
| + | mu = 0 , | ||
| + | name = , | ||
| + | type = Tri } , | ||
| + | type = NaturalImpurityOrbital } | ||
| + | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
| + | { { (0.31338878914433 - 0.0024767552810116 I) , (-0.64505747360543 - 0.0020730553941133 I) } , | ||
| + | { (-0.64505747360543 - 0.0020730553941133 I) , (-0.64950023863436 - 0.00303795224319 I) } } | ||
| + | </ | ||
| + | |||
| + | ===== Double tri-diagonal representation ===== | ||
| + | |||
| + | ### | ||
| + | Response functions stored in double tri-diagonal format are defined via | ||
| + | $$ G(\omega, | ||
| + | ### | ||
| + | |||
| + | ==== Single valued functions ==== | ||
| + | <code Quanty Example.Quanty> | ||
| + | acon = {0, | ||
| + | bcon = { | ||
| + | Gcon = ResponseFunction.New( {acon, | ||
| + | aval = {0, -1, -1, -2, -1, -1, -1} | ||
| + | bval = { | ||
| + | Gval = ResponseFunction.New( {aval, | ||
| + | a0 = 0 | ||
| + | b0 = 1 | ||
| + | G = ResponseFunction.New( {{a0, | ||
| + | print(" | ||
| + | print(G) | ||
| + | omega = 1.1 | ||
| + | Gamma = 0.001 | ||
| + | print() | ||
| + | print(" | ||
| + | print(G(omega, | ||
| + | </ | ||
| Generates the output | Generates the output | ||
| <file Quanty_Output> | <file Quanty_Output> | ||
| - | text produced as output | + | The response function definition is |
| + | { { 0 , 1 } , | ||
| + | kBT = 0 , | ||
| + | mu = 0 , | ||
| + | name = GDT , | ||
| + | con = { { 0 , 1 , 1 , 1 , 1 , 1 , 1 } , | ||
| + | { 0.70710678118655 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
| + | name = , | ||
| + | type = Tri , | ||
| + | mu = 0 } , | ||
| + | val = { { 0 , -1 , -1 , -2 , -1 , -1 , -1 } , | ||
| + | { 0.70710678118655 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
| + | name = , | ||
| + | type = Tri , | ||
| + | mu = 0 } , | ||
| + | type = DoubleTri } | ||
| + | |||
| + | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
| + | (0.63010824925044 - 0.0023903894659797 I) | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Matrix valued functions ==== | ||
| + | <code Quanty Example.Quanty> | ||
| + | Zero = Matrix.New( {{0, | ||
| + | acon = {Zero, Matrix.New( {{1, | ||
| + | bcon = {Matrix.New( {{0.6, | ||
| + | Gcon = ResponseFunction.New( {acon, | ||
| + | aval = {Zero, Matrix.New( {{-1, | ||
| + | bval = {Matrix.New( {{0.5, | ||
| + | Gval = ResponseFunction.New( {aval, | ||
| + | a0 = Zero | ||
| + | b0 = Matrix.New( {{1, | ||
| + | G = ResponseFunction.New( {{a0, | ||
| + | print(" | ||
| + | print(G) | ||
| + | omega = 1.1 | ||
| + | Gamma = 0.001 | ||
| + | print() | ||
| + | print(" | ||
| + | print(G(omega, | ||
| + | </ | ||
| + | Generates the output | ||
| + | <file Quanty_Output> | ||
| + | The response function definition is | ||
| + | { { { { 0 , 0 } , | ||
| + | { 0 , 0 } } , | ||
| + | { { 1 , 0 } , | ||
| + | { 0 , 1 } } } , | ||
| + | val = { { { { 0 , 0 } , | ||
| + | { 0 , 0 } } , | ||
| + | { { -1 , 0.3 } , | ||
| + | { 0.3 , -1.2 } } , | ||
| + | { { -2 , 0 } , | ||
| + | { 0 , -2 } } } , | ||
| + | { { { 0.5 , 0 } , | ||
| + | { 0 , 0.7 } } , | ||
| + | { { 0.4 , 0.1 } , | ||
| + | { 0.1 , 0.4 } } } , | ||
| + | mu = 0 , | ||
| + | name = , | ||
| + | type = Tri , | ||
| + | BlockSize = { 2 , 2 , 2 } } , | ||
| + | con = { { { { 0 , 0 } , | ||
| + | { 0 , 0 } } , | ||
| + | { { 1 , 0.2 } , | ||
| + | { 0.2 , 1.5 } } , | ||
| + | { { 2 , 0 } , | ||
| + | { 0 , 2 } } } , | ||
| + | { { { 0.6 , 0.1 } , | ||
| + | { 0.1 , 0.4 } } , | ||
| + | { { 0.5 , 0 } , | ||
| + | { 0 , 0.5 } } } , | ||
| + | mu = 0 , | ||
| + | name = , | ||
| + | type = Tri , | ||
| + | BlockSize = { 2 , 2 , 2 } } , | ||
| + | mu = 0 , | ||
| + | name = MDT , | ||
| + | type = DoubleTri , | ||
| + | kBT = 0 } | ||
| + | |||
| + | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
| + | { { (1.8222256078917 - 0.0064053919125334 I) , (-0.67187644577143 + 0.0015612104628324 I) } , | ||
| + | { (-0.67187644577143 + 0.0015612104628324 I) , (0.81931802332689 - 0.0014363767262552 I) } } | ||
| </ | </ | ||
| ===== Table of contents ===== | ===== Table of contents ===== | ||
| {{indexmenu> | {{indexmenu> | ||
| + | |||