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

Add support for modeling readout errors in noise model #1640

Open
1 task done
justinlietz opened this issue May 8, 2024 · 3 comments
Open
1 task done

Add support for modeling readout errors in noise model #1640

justinlietz opened this issue May 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@justinlietz
Copy link
Collaborator

Required prerequisites

  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.

Describe the feature

Background

Readout errors are caused by imperfect qubit measurement, and are a common source of error in quantum computing. Properly modeling these errors in simulation can give the user tools to better understand how these errors when running on actual quantum devices. There is a large body of work studying readout error, particularly in the context of how to mitigate it [1], [2].

Description

Expand the CUDA-Q NoiseModel (https://github.com/NVIDIA/cuda-quantum/blob/main/runtime/common/NoiseModel.h) to include readout errors.

The implementation should include an independent qubit measurement error model, where only two parameters are needed from the user (the probability that 0 is measured as 1, and the probability that 1 is measured as 0), and applied to each measurement.

The implementation should also include a full multi-qubit error model, where the full confusion matrix is used as input, which describes how each possible bit-string output maps to the erroneous bit-strings. The readout error can be applied by multiplying the noise-free measurements after sample has been called, and the simulation has finished.

This feature requested first in issue #891.

References

[1] https://mitiq.readthedocs.io/en/stable/guide/rem-5-theory.html
[2] https://arxiv.org/pdf/2006.14044

@justinlietz justinlietz added enhancement New feature or request UnitaryHack Good issue for UnitaryHack labels May 8, 2024
@justinlietz justinlietz removed the UnitaryHack Good issue for UnitaryHack label May 8, 2024
@justinlietz justinlietz self-assigned this May 8, 2024
@justinlietz
Copy link
Collaborator Author

Some things to note: this implementation would at first just target sample, and will apply to any simulator. This is different from the Kraus operator noise modeling which currently only applies to the density matrix simulation.

@justinlietz justinlietz removed their assignment May 22, 2024
@duydl
Copy link

duydl commented Jun 14, 2024

@justinlietz Hi, I want to work on this issue. I would like to confirm if this flow:

  • Add readout_error class that is equivalent to noise_model in NoiseModel.h.
  • Create a method to apply readout_error in sample_result class, probably in MeasureCounts.cpp, accessing sampleResults.
  • Check if platform in runSampling method has readout_error, then apply it with the new method of sample_result. About this location and other conditional returns .
  • Add examples to demonstrate.

Is this good enough or should it be lower to the quantum platform instead?

@duydl
Copy link

duydl commented Jun 18, 2024

Hi @justinlietz. With further studying I think the readout_error should be applied here

sample(sampleQubits, executionContext->hasConditionalsOnMeasureResults

Then the error would be for every subtype simulator. The error could be accessed from ExecutionContext. Though I am wondering if it should be applied to each measurement or all.

Could I get assigned and submit a PR for this issue?

@bettinaheim bettinaheim changed the title Readout Error in Noise Model Add support for modeling readout errors in noise model Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants