Skip to content

Conversation

@AntonNI8
Copy link
Contributor

@AntonNI8 AntonNI8 commented Oct 31, 2025

Before submitting

Please complete the following checklist when submitting a PR:

  • Ensure that your tutorial executes correctly, and conforms to the
    guidelines specified in the README.

  • Remember to do a grammar check of the content you include.

  • All tutorials conform to
    PEP8 standards.
    To auto format files, simply pip install black, and then
    run black -l 100 path/to/file.py.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Title:

Summary:

Relevant references:

Possible Drawbacks:

Related GitHub Issues:


If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?

    Eg. Promote a new PL feature or show a PL implementation of a recent paper.

  • AUDIENCE — Who is this for?

    Eg. Chemistry researchers, PL educators, beginners in quantum computing.

  • KEYWORDS — What words should be included in the marketing post?

  • Which of the following types of documentation is most similar to your file?
    (more details here)

  • Tutorial
  • Demo
  • How-to

@github-actions
Copy link

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

@AntonNI8 AntonNI8 changed the base branch from master to filter-fix November 14, 2025 22:26
doctorperceptron added a commit that referenced this pull request Nov 17, 2025
After the update to Sphinx, Sphinx Gallery now outputs a different
format for generated code blocks, where the code block is now part of an
entirely separate element and no longer nested in `rst-class` directive.
This PR adds a fix to be able to handle both the new and old
`sphx-glr-script-out` formats. It has been tested on #1592 .
Base automatically changed from filter-fix to master November 17, 2025 14:23
@github-actions
Copy link

github-actions bot commented Nov 17, 2025

Your preview is ready 🎉!

You can view your changes here

Deployed at: 2025-12-08 16:50:02 UTC

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

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

Nice work @AntonNI8! I read through and left some comments.

At a high level, my main comment is that the flow/story can be adjusted and tightened somewhat.

  • The introduction can be reduced, and made sure to emphasize what the how-to demo is going to show the reader to do.

  • The first section (with the timing of the hamiltonian computation) I find a bit distracting/doesn't quite fit. As a reader looking for 'how to do resource estimation', I've already decided to do resource estimation -- so no need to motivate it to me from the point of avoiding hamiltonian construction! However this section is still quite nice, so could be kept as an appendix.

  • For the overall story, I actually found the last section the easiest to follow. Putting myself into the shoes of a reader who wants to know, succinctly, 'how to do resource estimation', I recommend drawing inspiration from the last section, and using it to tell a cohesive story:

    • First section: show the reader how to do resource estimation with an existing, executable PL Kitaev model.

    • Second section:

      • introduce the compact Hamiltonian and briefly describe why it is useful, and show that its resource estimation matches the full one.
      • Show the reader how to rewrite their circuit using resource operators, and again compute the resources.
    • Third section: Change the default gateset, swap out one of the decompositions, and change the precision, and again compute the resources. I would probably avoid showing too many examples on single operators, as it is a bit distracting from the overall story.

    • Conclusion: the reader now knows how to do resource estimation in PL! Provide links to docs and other demos for more examples for them to read up on, or other configuration options that might be interesting.

    • Appendix

    • references

@AntonNI8 AntonNI8 requested review from DSGuala and josh146 November 26, 2025 23:44
Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

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

Thanks @AntonNI8 @Jaybsoni, the story is very well done now! I have left mostly stylistic and minor structuring comments below, once taken into account I think the demo is good to go 🙌

Comment on lines +194 to +196
def circuit(hamiltonian, num_steps, order):
qre.UniformStatePrep(num_states=2**n_q) # uniform superposition over all basis states
qre.TrotterPauli(hamiltonian, num_steps, order)
Copy link
Member

Choose a reason for hiding this comment

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

Something I think is worth emphasizing to the reader is that this circuit is not executable (e.g., you could show them what happens when they execute this function --- I assume nothing, and compare it to what happens when you execute executable_circuit).

Comment on lines +604 to +613
######################################################################
# Your turn!
# ~~~~~~~~~~
#
# Now that you’ve seen how powerful PennyLane’s
# quantum resource :mod:`estimator <pennylane.estimator>` is,
# go try it out yourself!
#
# Use PennyLane to reason about the costs of your quantum algorithm
# without any of the headaches.
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there is something more explicit to put here in the concluding call-to-action. As it is currently worded, it isn't really saying much that hasn't already been said earlier on in the demo.

Perhaps this is the place to mention some of the other features of the estimation module, point to specs, etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants