Skip to content

Commit

Permalink
Fix logic in sr::op::A(), add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-mk committed Feb 14, 2024
1 parent 7a878a2 commit 1f0fd88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions SeQuant/domain/mbpt/models/cc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ std::vector<sequant::ExprPtr> CC::eom_sigma(size_t K_occ, size_t K_uocc) {
auto idx = std::max(K_occ, K_uocc); // idx for populating the result vector
result.resize(idx + 1);

// TODO: Fix bug in EA, IP cases
using boost::numeric_cast;
for (auto o = numeric_cast<std::int64_t>(K_occ),
u = numeric_cast<std::int64_t>(K_uocc);
Expand Down
3 changes: 2 additions & 1 deletion SeQuant/domain/mbpt/sr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ ExprPtr A(std::int64_t Kh, std::int64_t Kp) {
[=](qnc_t& qns) {
const std::size_t abs_Kh = std::abs(Kh);
const std::size_t abs_Kp = std::abs(Kp);
if (Kp < 0)
if (Kp < 0 || Kh < 0)
qns = combine(qnc_t{abs_Kp, 0ul, 0ul, abs_Kh}, qns);
else
qns = combine(qnc_t{0ul, abs_Kh, abs_Kp, 0ul}, qns);
Expand Down Expand Up @@ -599,6 +599,7 @@ std::wstring to_latex(const mbpt::Operator<mbpt::sr::qns_t, S>& op) {
if (to_class(optype) == OpClass::gen) {
result += L"}";
return result;
// TODO: A(2, 1) produces \hat{A}, which has no info about ranks. Fix this
}
}

Expand Down

0 comments on commit 1f0fd88

Please sign in to comment.