TRIQS / triqs

a Toolbox for Research on Interacting Quantum Systems
https://triqs.github.io
GNU General Public License v3.0
139 stars 72 forks source link

[sumk] assert dimensions of Sigma to match hopping #859

Closed the-hampel closed 1 year ago

the-hampel commented 1 year ago

Add a check and extend the doc strings to make sure that each block in Sigma has the same dimension as self.hopping. Otherwise sumk can give wrong results without throwing an error. later on when [tmp - mu_pat] is calculated the dimension will always be casted to match, because of numpy subtraction.

Thanks @phibeck for reporting the problem.