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

Observable Measurement - 3.5 - Readout Correction #3649

Conversation

mpharrigan
Copy link
Collaborator

This is part 3.5 or 4.5 of #2781

It comes either before or after #3647

This extends the vanilla BitstringAccumulator to handle readout calibrations which can be used to correct observables and mitigate the effect of readout error. However, users should probably never use this functionality directly; instead passing the appropriate configuration options to the functions defined in #3647. It would make git dependencies if this is merged first.

More sophisticated readout mitigation schemes would be implemented by subclassing BitstringAccumulator. Subclasses would (1) modify the constructor to accept the relevant calibration info, if different than this simple scheme and (2) modify the mean() and variance() functions to correct those quantities using the new scheme.

@mpharrigan mpharrigan requested review from cduck, vtomole and a team as code owners January 8, 2021 02:12
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Jan 8, 2021
@mpharrigan
Copy link
Collaborator Author

@viathor @balopat PTAL!

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

I think this looks OK. Added some nits. Also I think we could merge this but not refer to the non-existent methods yet in the docstrings...

cirq/work/observable_measurement_data.py Outdated Show resolved Hide resolved
cirq/work/observable_measurement_data.py Outdated Show resolved Hide resolved
cirq/work/observable_measurement_data.py Outdated Show resolved Hide resolved
cirq/work/observable_measurement_data.py Outdated Show resolved Hide resolved
cirq/work/observable_measurement_data.py Outdated Show resolved Hide resolved
cirq/work/observable_measurement_data.py Outdated Show resolved Hide resolved
cirq/work/observable_measurement_data.py Outdated Show resolved Hide resolved
@balopat balopat changed the title Observable Measurement - ? - Readout Correction Observable Measurement - 3.5 - Readout Correction Jan 15, 2021
Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

LGTM with a nit for reference

f = a / b

# assume cov(a,b) = 0, otherwise there would be another term.
var = f ** 2 * (var_a / (a ** 2) + var_b / (b ** 2))
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a reference or derivation for this formula?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

@mpharrigan mpharrigan added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jan 20, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jan 20, 2021
@CirqBot CirqBot merged commit 1ec8080 into quantumlib:master Jan 20, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Jan 20, 2021
@mpharrigan mpharrigan deleted the 2020-12-operator-estimation-x-readout-corr branch January 20, 2021 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/expectation-value cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants