feat(examples): add QDP tutorial notebook for Google Colab#1068
feat(examples): add QDP tutorial notebook for Google Colab#1068SuyashParmar wants to merge 39 commits intoapache:mainfrom
Conversation
# Conflicts: # website/docusaurus.config.ts
This reverts commit 7b1d30d.
|
@ryankert01 can you pls check it ? |
|
Could you provide the colab link? |
|
You should use the correct one on the spot |
|
@ryankert01 recheck ? |
|
Please help not do that and refer to mahout docs quickstart section |
|
@ryankert01 made changes to fix the Checks error |
…encies and correct PennyLane data casting
a9790e0 to
fafa8ce
Compare
|
@ryankert01 sir can you pls re-run the checks |
|
@ryankert01 not able to figure out why checks are failing |
this is the reason |
|
@SuyashParmar maybe you should consider easier issues to work on that suited you. |
|
@ryankert01 @guan404ming CI was failing because test-notebooks runs on CPU-only ubuntu-latest and executes a GPU-only QDP notebook (QdpEngine(0)), so I fixed it by excluding qdp/qdp-python/benchmark/notebooks/* from that workflow while keeping the notebook itself direct and real for Colab GPU runs. |
|
If you want to keep notebook CI enabled for this file, we can keep the notebook straight-through but add one explicit prerequisite cell (assert QdpEngine.module == "_qdp") plus install _qdp in CI before execution (or use a GPU runner), because on CPU-only runners a real QdpEngine(0) notebook cannot pass without either setup changes or a conditional skip. |
|
Yeah! I think we probably just skip the ci. Btw, I think it should be located at examples/qdp. Let's move it there and notebook should be as educational purposes as possible. Please proof read it. And I kinda understand why you wrote this kinda code hh. I just use claude code to write some notebook for me, and it gets me same output lol. Maybe next thing we should work on is to make agent not mis-understanding |



This PR adds a ready-to-run Jupyter Notebook :
qdp/qdp-python/benchmark/notebooks/mahout_qdp_tutorial.ipynb
designed specifically for Google Colab.
Key Features:
Automated Setup: Includes cells to install Rust and build the QDP package from source directly in the Colab environment (no manual setup required).
Interactive Walkthrough: Demonstrates Engine initialization, data encoding (Lists, NumPy, PyTorch), and GPU acceleration.
PyTorch Integration: Shows how to perform zero-copy transfer of quantum states to PyTorch tensors.
How to Test: Upload the notebook to Google Colab (using a T4 GPU runtime) and run all cells. It validates the end-to-end workflow from installation to execution.