This PR provides a bug fix for the gate combination system. The bug originated from the fact that when a function f was passed, it was applied to each "sub-gate" operation, rather than to the final output of the combination. For example, if one passes g = ("a† * a", 1, (f = myfunction)), the output was actually f(a†) * f(a), instead of f(a†a).
This PR provides a bug fix for the gate combination system. The bug originated from the fact that when a function
f
was passed, it was applied to each "sub-gate" operation, rather than to the final output of the combination. For example, if one passesg = ("a† * a", 1, (f = myfunction))
, the output was actuallyf(a†) * f(a)
, instead off(a†a)
.