Fix Pauli-basis expansion normalization#5107
Open
matti-sarjala wants to merge 1 commit into
Open
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
|
Contributor
|
Thanks for contributing to Qiskit documentation! Before your PR can be merged, it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. Thanks! 🙌 One or more of the following people are relevant to this code: |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This corrects the Pauli-basis expansion formula in
docs/guides/specify-observables-pauli.ipynbby adding the missing1/2^nHilbert--Schmidt normalization factor.Why
For standard n-qubit Pauli strings,
so the coefficient of a Pauli string
Pin the expansion of an observableOisThis also matches the coefficients printed by the example immediately below the formula.
Risk
Documentation-only change. No code or API behavior is changed.
Tested
Checked the formula against the 2-qubit matrix example in the same guide:
Tr(O IZ) = -4,Tr(O XI) = 2, andTr(O YY) = 4, which become-1,0.5, and1after division by2^2 = 4.