Skip to content

Commit

Permalink
Fix bug where spectrum was not broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
thangleiter committed May 20, 2022
1 parent 4798d39 commit 109880a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions filter_functions/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,17 @@ def _get_integrand(
# R is not None
if which_pulse == 'correlations':
if which_FF == 'fidelity':
einsum_str = 'gako,ao,hako->ghao'
einsum_str = 'g...ko,...o,h...ko->gh...o'
else:
# which_FF == 'generalized'
einsum_str = 'gako,ao,halo->ghaklo'
einsum_str = 'g...ko,...o,h...lo->gh...klo'
else:
# which_pulse == 'total'
if which_FF == 'fidelity':
einsum_str = 'ako,ao,ako->ao'
einsum_str = '...ko,...o,...ko->...o'
else:
# which_FF == 'generalized'
einsum_str = 'ako,ao,alo->aklo'
einsum_str = '...ko,...o,...lo->...klo'

integrand = np.einsum(einsum_str,
ctrl_left[..., idx, :, :], spectrum, ctrl_right[..., idx, :, :])
Expand Down

0 comments on commit 109880a

Please sign in to comment.