Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircuitResult does not apply bitflip noise #1105

Closed
BrunoLiegiBastonLiegi opened this issue Nov 23, 2023 · 1 comment · Fixed by #1076
Closed

CircuitResult does not apply bitflip noise #1105

BrunoLiegiBastonLiegi opened this issue Nov 23, 2023 · 1 comment · Fixed by #1076
Assignees
Labels
bug Something isn't working
Milestone

Comments

@BrunoLiegiBastonLiegi
Copy link
Contributor

CircuitResult relies on the probabilities calculated from the final state after execution (QuantumState.probabilities()). When bitflip noise is present, however, the state probabilities shouldn't be used as they don't account for the bitflips in measurements. In that case, the MeasurementOutcomes.probabilities() should be used, as they should construct the probabilities starting from the samples, which account for bitflips.

from qibo import gates, Circuit
c = Circuit(1)
c.add(gates.M(0, p0=0.3))
r = c()
print(r.probabilities())
# this gives (1., 0.) instead of the expected (0.3, 0.7)
@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi added the bug Something isn't working label Nov 23, 2023
@BrunoLiegiBastonLiegi
Copy link
Contributor Author

The fix to this bug is contained in #1076.

@scarrazza scarrazza added this to the Qibo 0.2.4 milestone Nov 29, 2023
@renatomello renatomello linked a pull request Dec 13, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants