Update OBP tutorial to conform to new template#4946
Update OBP tutorial to conform to new template#4946ritajitmajumdar1 wants to merge 25 commits intoQiskit:mainfrom
Conversation
|
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! 🙌 |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Hi @ritajitmajumdar1! Ok for me to move your new file to the |
|
Yes, sure. |
abbycross
left a comment
There was a problem hiding this comment.
I did a round of copyediting and ran the checks. Ready from my side
henryzou50
left a comment
There was a problem hiding this comment.
Thanks @ritajitmajumdar1 for the changes and @abbycross for the updates and review. Overall, nice work converting this to the template format! Here are some requested suggestions.
1. Add a job tag to the large-scale estimator
So it should be something like:
estimator.options.environment.job_tags = ["TUT_OBP"]2. Restore live execution in the large-scale block
Uncomment # job = estimator.run(pubs) and remove job = service.job("d79ukpjc6das739jds5g"), the hardcoded job ID won't work for any other reader.
3. Step 4 no longer prints value of the results
The previous version printed Expectation value without backpropagation: 0.788... etc. The new version only assigns variables before plotting. Worth restoring the print(...) lines so readers see the numbers especially if they are close, not just bars.
Some minor grammar fixes
Learning outcomes & Background:
- "at the cost of increased number of circuit execution" → "executions"
- "construct XYZ Hamiltonians and their time-evolution circuit" → "circuits"
Step 3:
- "we create two Primitive Unified Blocs (PUB)" → "(PUBs)"
- "execute the pubs" → "PUBs"
Large-scale example intro:
- "we use tensor network and obtain" → "we use a tensor network and obtain"
|
I tried implementing those changes suggested by @henryzou50 - can you verify that I updated the code properly (i.e., the first three items in Henry's list)? |
There was a problem hiding this comment.
@abbycross Thanks for the updates! LGTM! I can rerun the notebook so that we can see the print statements, and then push that update once it is ready.
… values and depth prints - Rerun the notebook to refresh all outputs - Drop the `as Estimator` alias so the small-scale section uses `StatevectorEstimator` directly, making it explicit that part 1 runs on a simulator - Add a markdown cell after the small-scale plot explaining that the two bars agree because the simulator is noiseless, and pointing forward to the hardware example for the actual benefit of OBP - Revert ZNE `noise_factors` back to `[1, 1.2, 1.4]`; the narrower `[1, 1.1, 1.2]` window made linear extrapolation too sensitive and pushed the no-backpropagation result past the physical bound - Reintroduce the 2-qubit depth prints for the original, backpropagated, and truncated circuits so readers can see the depth savings before the hardware run
|
I managed to improved the hardware results for all cases by reverting Here are some other minor edits I made along the way:
Otherwise, I would say this PR is good to go. @nathanearnestnoble Can you take a quick review on it before it gets merged? |
|
@ritajitmajumdar1 Nice catch! I reran with |
|
On consistency in results: I think the consistency issue can hopefully be characterized a bit more systematically with @emilkovacev. Aside from this, I would only suggest we add reference to the pauli prop package: https://github.com/Qiskit/pauli-prop/tree/main/docs/tutorials. I think it fits best 'next steps'....could maybe go in 'prereqs'. Thank you @ritajitmajumdar1 and @henryzou50 for pushing this forward! |




Updated the tutorial to conform to the new template. Need to try a few more times with different settings to obtain better result.