Closed jlbosse closed 1 year ago
Base: 88.28% // Head: 86.93% // Decreases project coverage by -1.35%
:warning:
Coverage data is based on head (
30c388a
) compared to base (9d7ab2e
). Patch has no changes to coverable lines.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
need tests pass before a review
The tests fun on my local machines on julia 1.8.3 and 1.8.2 and are in parts of the tests that shouldn't be affected by my changes at all. So I also think that the failures on nightly are unrelated.
Up until now
expect_g
andfidelity_g
were off by a factor of one half, in the sense that ∂_reg expect(ham, reg) = 2 * expect_g(ham, reg) instead ∂_reg expect(ham, reg) = expect_g(ham, reg) and analogous for the other methods ofexpect_g
andfidelity_g
. This was counter acted by multiplying a factor of 2 to the finalparamsδ
at the end ofexpect_g(ham, reg => circuit)
andfidelity_g(reg1 => circuit1, reg2 => circuit2)
.This is changed here to backpropagate the "correctly" scaled gradient w.r.t registers.
I am not sure if this would be considered a breaking change, because it also means that the output of
expect'(ham, reg => circuit)[1]
is changed by a factor of 2 now.Changes: