TRIQS / triqs

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

Error raised when calling `make_gf_dlr_imfreq` when using a symmetric Bosonic imaginary time DLR mesh #933

Closed Casper-Pijnenburg closed 6 months ago

Casper-Pijnenburg commented 6 months ago

Description

I'm using the unstable TRIQS version and I'm running into an unexpected error when trying to call make_gf_dlr_imfreq on a DLR coefficient Green’s function defined on a symmetric Bosonic imaginary time mesh

Steps to reproduce

Here is a minimal python script to reproduce the error

from triqs.gf import Gf, make_gf_dlr, make_gf_dlr_imfreq
from triqs.gf.meshes import MeshDLRImTime, MeshDLRImFreq

tau_mesh = MeshDLRImTime(beta = 20, statistic = 'Boson', w_max = 2.0, eps = 1e-15, symmetrize = True)

G_tau = Gf(mesh = tau_mesh, target_shape = [])
G_dlr = make_gf_dlr(G_tau)
G_iw = make_gf_dlr_imfreq(G_dlr)

Expected behaviour

To construct a DLR imaginary frequency Green's function from G_dlr, something that works for Fermionic statistics and for non-symmetrized meshes.

Actual behaviour

Assertion error raised

AssertionError: Mismatch between data shape (31,) and sizes of mesh(es) (30,)

Versions

% python3 -c "from triqs.version import *; show_version(); show_git_hash();"
You are using the TRIQS library version 3.2.0
You are using the git hash 2702697c5945c35597f1941d48bba7a08afb14c3
% uname -v
#18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb  7 11:40:03 UTC 2
Wentzell commented 6 months ago

Thank you @Casper-Pijnenburg for pointing out this issue! This was fixed in 012247c09