From d9d1b49258fc173447a44462c60ed1e5cb466c2f Mon Sep 17 00:00:00 2001 From: Junya Otsuki Date: Mon, 22 Jan 2024 13:00:01 +0900 Subject: [PATCH] minor improve --- src/dcore/impurity_solvers/hphi_spectrum.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dcore/impurity_solvers/hphi_spectrum.py b/src/dcore/impurity_solvers/hphi_spectrum.py index 3b67a3e8..cba3166e 100644 --- a/src/dcore/impurity_solvers/hphi_spectrum.py +++ b/src/dcore/impurity_solvers/hphi_spectrum.py @@ -101,8 +101,10 @@ def calc_one_body_green(one_body_green_core): assert G_diag.shape == (n_site*n_sigma, n_T, n_omega) # Off-diagonal - A2 = A - G_diag[:, None, ...] - G_diag[None, :, ...] # A_{ij} - G_{ii} - G_{jj} - B2 = B - G_diag[:, None, ...] - G_diag[None, :, ...] # B_{ij} - G_{ii} - G_{jj} + G_iijj = G_diag[:, None, ...] - G_diag[None, :, ...] # G_{ii} - G_{jj} + assert G_iijj.shape == G_shape + A2 = A - G_iijj # A_{ij} - G_{ii} - G_{jj} + B2 = B - G_iijj # B_{ij} - G_{ii} - G_{jj} G_ij = (A2 - 1J * B2) / 2. # upper triangle (ij) assert G_ij.shape == G_ji.shape == G_shape