Loading...
Searching...
No Matches
gpr::quantum::bathresponse::Model Struct Reference

#include <gpr/quantum/HarmonicBathResponse.h>

Public Member Functions

Matrix gleDrift () const
Matrix gleInput () const
Matrix gleOutput () const
Matrix response (double shift) const

Public Attributes

Matrix stiffness
Matrix coupling

Detailed Description

Definition at line 18 of file HarmonicBathResponse.h.

Member Function Documentation

◆ gleDrift()

Matrix gpr::quantum::bathresponse::Model::gleDrift ( ) const
inline

Definition at line 22 of file HarmonicBathResponse.h.

23 {
24 const auto n = stiffness.rows();
25 Matrix drift = Matrix::Zero(2 * n, 2 * n);
26 drift.topRightCorner(n, n) = -Matrix::Identity(n, n);
27 drift.bottomLeftCorner(n, n) = stiffness;
28 return drift;
29 }

◆ gleInput()

Matrix gpr::quantum::bathresponse::Model::gleInput ( ) const
inline

Definition at line 30 of file HarmonicBathResponse.h.

31 {
32 Matrix input = Matrix::Zero(2 * stiffness.rows(), coupling.cols());
33 input.bottomRows(stiffness.rows()) = coupling;
34 return input;
35 }

◆ gleOutput()

Matrix gpr::quantum::bathresponse::Model::gleOutput ( ) const
inline

Definition at line 36 of file HarmonicBathResponse.h.

37 {
38 Matrix output = Matrix::Zero(coupling.cols(), 2 * stiffness.rows());
39 output.leftCols(stiffness.rows()) = coupling.transpose();
40 return output;
41 }

◆ response()

Matrix gpr::quantum::bathresponse::Model::response ( double shift) const
inline

Definition at line 42 of file HarmonicBathResponse.h.

43 {
44 Matrix shifted = stiffness;
45 shifted.diagonal().array() += shift;
46 Eigen::LLT<Matrix> factor(shifted);
47 if (factor.info() != Eigen::Success)
48 throw std::domain_error("Positive shifted bath stiffness required");
49 const Matrix result = coupling.transpose() * factor.solve(coupling);
50 if (!result.allFinite())
51 throw std::overflow_error("Bath response exceeds range");
52 return .5 * (result + result.transpose());
53 }

Member Data Documentation

◆ coupling

Matrix gpr::quantum::bathresponse::Model::coupling

Definition at line 19 of file HarmonicBathResponse.h.

◆ stiffness

Matrix gpr::quantum::bathresponse::Model::stiffness

Definition at line 19 of file HarmonicBathResponse.h.


The documentation for this struct was generated from the following file: