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

Guides pages for OBP #2248

Merged
merged 15 commits into from
Nov 12, 2024
Merged

Guides pages for OBP #2248

merged 15 commits into from
Nov 12, 2024

Conversation

kaelynj
Copy link
Collaborator

@kaelynj kaelynj commented Nov 5, 2024

Closes #2107 and closes #2108

I'll include the files in the toc and satiate CI once #2148 is merged to avoid dealing with conflicts.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@caleb-johnson
Copy link
Contributor

Thanks Kaelyn, looks great! I'll just drop a few thoughts below for the getting started guide:

  • Paragraph 1

    • For clarity can we change "slices" --> "circuit slices" when we first mention it since this is kind of a made-up term
    • I like that you highlight preparation of the slices and operator budget. I think we need to include the truncation budget here, as it is arguably more important than the operator budget (can explain this in more detail if you're interested). Some of the language in your OBP landing page intro could be moved over here regarding this.
  • Prepare inputs to backpropagate

    • qiskit_addons_utils.slice_by_gate_types() --> qiskit_addon_utils.slicing.slice_by_gate_types

Copy link
Contributor

@caleb-johnson caleb-johnson left a comment

Choose a reason for hiding this comment

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

Looks great, just a couple of minor comments/requests

docs/guides/qiskit-addons-obp.mdx Outdated Show resolved Hide resolved
docs/guides/qiskit-addons-obp.mdx Outdated Show resolved Hide resolved
@BryceFuller
Copy link

BryceFuller commented Nov 11, 2024

I have a few suggested edits to qiskit-addons-obp.mdx:

This method has the benefit that the overhead incurred by backpropagating various gates is determined by the non-Cliffordness of that gate (i.e. how much of a particular portion of $U_C$ which contains non-Clifford instructions).

I would change to

This method has the benefit that the overhead incurred by backpropagating various gates scales with the non-Cliffordness of $U_C$ (i.e. how much of $U_C$ is comprised of non-Clifford instructions).

Also, later in that section I would append an additional sentence

Each of these slices are then analytically applied in sequence to measure the back propagated operator $O'$ and may or may not contribute to the overall size of the sum, depending on if the slice is a Clifford vs non-Clifford operation.

would become

Each of these slices are then analytically applied in sequence to measure the back propagated operator $O'$ and may or may not contribute to the overall size of the sum, depending on if the slice is a Clifford vs non-Clifford operation. If an error budget is allocated, truncation will then occur between the application of each slice.

Here are some suggested edits to qiskit-addons-obp-get-started.ipynb:

there is a space missing in one of the print messages for the cell that runs the actual OBP method

New observable has 17 terms, which can be combined into7 groups.

should print out

New observable has 17 terms, which can be combined into 7 groups.

Also, the value of t here has been changed from 0.2 in the obp tutorial, to 2. This results in the optimal expval being very close to 0, and the final answers in the notebook are all within statistical accuracy from zero. Can you return t to it's earlier value so we know there is a larger expval.

EDIT: looks like reps also changed. It's ok for these values to differ from the addon documentation, as long as the target expval is not very close to 0.

Copy link
Collaborator

@abbycross abbycross left a comment

Choose a reason for hiding this comment

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

copyediting suggestions, otherwise good to go

@jenglick
Copy link
Collaborator

@kaelynj -- pending getting Bryce's suggestions folded in, are you also able to also add in the results for running the backprop and backprop w truncation circuits run on the StatevectorEstimator to isolate the OBP-specific effects? Beyond that, this looks good to me!

@kaelynj
Copy link
Collaborator Author

kaelynj commented Nov 12, 2024

@kaelynj -- pending getting Bryce's suggestions folded in, are you also able to also add in the results for running the backprop and backprop w truncation circuits run on the StatevectorEstimator to isolate the OBP-specific effects? Beyond that, this looks good to me!

This should be included now (along with @BryceFuller's suggestion).

@Eric-Arellano I'm having an issue with CI on the checkPatternsIndex script. NPM claims that the pages are not present in the toc when they actually are. Could this be because the pages are nested one level further than the rest of ours?

@jenglick
Copy link
Collaborator

@kaelynj The tutorial for OBP in Learning Platform just dropped -- would you be able to add a link to this in the "next steps" section of the getting started page?

https://learning.quantum.ibm.com/tutorial/improving-estimation-of-expectation-values-with-operator-backpropagation

@kaelynj kaelynj added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit 8e335ea Nov 12, 2024
4 of 5 checks passed
@kaelynj kaelynj deleted the kjf/qiskit-addons-obp branch November 12, 2024 22:12
@kaelynj kaelynj mentioned this pull request Nov 12, 2024
@kaelynj
Copy link
Collaborator Author

kaelynj commented Nov 12, 2024

@kaelynj The tutorial for OBP in Learning Platform just dropped -- would you be able to add a link to this in the "next steps" section of the getting started page?

https://learning.quantum.ibm.com/tutorial/improving-estimation-of-expectation-values-with-operator-backpropagation

Ended up adding this link in the AQC pr #2291 to save time for QDC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[ NEW GUIDE ] OBP get started [ NEW GUIDE ] OBP intro
5 participants