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

enable sampling for readout error #222

Merged
merged 6 commits into from
Aug 1, 2019

Conversation

hhorii
Copy link
Collaborator

@hhorii hhorii commented Jun 4, 2019

Summary

This PR adds support of sampling for read-out errors in qasm simulator.

Details and comments

Currently, qasm simulator enables sampling if

  • noise_model.ideal() returns true, and
  • all the measure operations are the bottom in a circuit

This PR will change as follows:

  • noise_model.ideal() or noise_model.only_readout_errors() returns true, and

  • all the measure and readout-error operations are the bottom in a circuit.

  • Implement this feature

  • Add tests

@chriseclectic
Copy link
Member

I think it would be good to have the noise model objects to have methods that return True/False to check for readout errors, local quantum errrors, and non-local quantum errors (this will also be useful for optimisation passes later)

  • noise_model.ideal(): returns True if there are no quantum errors nor readout errors, otherwise False.
  • noise_model.has_readout_errors(): returns True if there are readout errors, or false if not (regardless of quantum errors present).
  • noise_model.has_quantum_errors(): returns True if there are either local or non-local quantum errors (regardless of readout errors).
  • noise_model.has_local_quantum_errors(): returns True if there are local quantum errors, or false if not (regardless of non-local quantum errors or readout errors present).
  • noise_model.has_nonlocal_quantum_errors(): returns True if there are non-local quantum errors, or False if not (regardless of local quantum errors or readout errors present).

Then in this PR you could replace for example noise_model_.ideal() || noise_model_.only_readout_errors() with noise_model_.has_quantum_errors() == false

@hhorii hhorii force-pushed the readout_sampling branch from 5408e34 to 8079e41 Compare July 25, 2019 14:53
@hhorii hhorii changed the title [WIP] enable sampling for readout error enable sampling for readout error Jul 25, 2019
@chriseclectic chriseclectic added this to the 0.3 milestone Jul 25, 2019
Copy link
Member

@chriseclectic chriseclectic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good @hhorii, could you fix the conflicts and update CHANGELOG and then we can merge

@hhorii hhorii force-pushed the readout_sampling branch from 552c297 to 8c967fd Compare August 1, 2019 13:39
@chriseclectic chriseclectic merged commit 0561848 into Qiskit:master Aug 1, 2019
dcmckayibm pushed a commit to dcmckayibm/qiskit-aer that referenced this pull request Nov 3, 2019
* enable sampling for readout error

* fix a bug in noise-model sampling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants