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

(Offline) Qrack tutorial #1142

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

WrathfulSpatula
Copy link

Title:
The Qrack device back end (with Catalyst)

Summary:
In this tutorial you will learn how to use the Qrack device back end for PennyLane and Catalyst, and you'll learn certain suggested cases of use where Qrack might particularly excel at delivering lightning-fast performance or minimizing required memory resources. (See #1137: this recreates the PR for further review)

Relevant references:
https://github.com/unitaryfund/qrack
https://github.com/unitaryfund/pyqrack
https://arxiv.org/abs/2304.14969

Possible Drawbacks:
Not all users might have Catalyst installed, and this tutorial will require Catalyst v0.7 or later.


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

  • GOALS — Why are we working on this now?

    The Catalyst and Unitary Fund teams are working together to update the Qrack PennyLane device back end (based on open-source code reuse from the Qulacs device and original work with Qrack and Catalyst) to make use of the Catalyst compiler and potentially achieve leading performance on a wide range of qml.qnode subroutine qubit widths and applications. Notably, Qrack automatically switches between CPU-based and GPU-used based simulation methods as appropriate to maximize overall performance, whether circuits are wide enough to benefit from thousands of parallel work items in a job dispatched to a GPU. The Qrack device back end is also open source and can serve as an example or basis for other simulator device back ends that may reuse its code.

  • AUDIENCE — Who is this for?

    The potential audience includes researchers, educators, students, hobbyists, and anyone with an interest in faster and more efficient quantum computer simulation in PennyLane.

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

    GPU, high-performance computing (HPC), hybrid CPU/GPU, near-Clifford simulation, quantum binary decision diagrams (QBDD), vendor-agnostic GPU support (OpenCL), optional CUDA

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

  • Tutorial
  • Demo
  • How-to

Copy link

github-actions bot commented Jul 3, 2024

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1142
  • Deployment SHA: 5368a1a8561b7ef2da4d72cbc418a255922ee4a5
    (The Deployment SHA refers to the latest commit hash the docs were built from)

Note: It may take several minutes for updates to this pull request to be reflected on the deployed site.

@WrathfulSpatula
Copy link
Author

@josh146 @ikurecic I think this might be ready-to-roll! The demo is now "offline." In the preview, the images don't load for me, but, if I go directly to the image file location, the preview environment tells me that "access is denied." I suspect that's not something I need to fix, but please let me know if it is!

@josh146 josh146 changed the base branch from master to dev July 3, 2024 20:01
@josh146 josh146 changed the base branch from dev to master July 3, 2024 20:01
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ikurecic ikurecic left a comment

Choose a reason for hiding this comment

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

Thanks a lot for sharing this, @WrathfulSpatula !

I've left some suggestions, recommendations and comments, and I've also texted you on Discord regarding some of the figures that we'll want to still include. ☺

And, aside from the specific suggestions I left in the files, it wouldn't be the worst idea if you wanted to sparsely sprinkle in a few comments inside of your codeblocks.

demonstrations/qrack.metadata.json Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
demonstrations/qrack.py Outdated Show resolved Hide resolved
WrathfulSpatula and others added 4 commits July 5, 2024 14:26
Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
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.

None yet

3 participants