Closed Hosseinberg closed 1 year ago
Is this a duplicate of #577? qsim hasn't had a release since that PR, so you may need to clone and build locally to see it effects. If this isn't feasible for you I can package a dev release later this week.
@95-martin-orion I believe this is not a duplicate of #577 since even after cloning and building locally the issue still exists. However, the suggested commit 3841701 will resolve the issue.
@95-martin-orion I'm getting an error in the formatting check. Which Python code formatter should I use to ensure that it passes the format check?
@95-martin-orion I'm getting an error in the formatting check. Which Python code formatter should I use to ensure that it passes the format check?
Formatting is checked with check/format-incremental, which uses black~=22.3.0
. It should be possible to run this script locally.
From the logs, it looks like there's trailing whitespace on the marked lines.
The coefficient of the identity operators is now included in the expectation value calculation. The following example uses three different methods to calculate the expectation value. qsimcirq discards the coefficient of the identity operator. This PR resolves this issue.