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

Add pybind11 and Python layers to lightning.tensor #748

Merged
merged 414 commits into from
Jun 12, 2024

Conversation

multiphaseCFD
Copy link
Member

@multiphaseCFD multiphaseCFD commented May 30, 2024

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    tests directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the .github/CHANGELOG.md file, summarizing the
    change, and including a link back to the PR.

  • Ensure that code is properly formatted by running make format.

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


Context:

Add both python and pybind layer to the lightning.tensor-mps device.

  1. Gates supported: Operators that have 1 or 2 wires or can be decomposed into 1-2 wires gates. MultiRZ gate is not supported.
  2. Obs supported: All obs supported in lightning state vector backends except for qml.Projector and SparseHamiltionian
  3. Both qml.QubitStateVector and qml.StatePrep are not supported.
  4. qml.state() is not supported and the state() returns a LightningStateTensor object represents the whole compute graph
  5. qml.BasisState only accepts array representation of a basis state. A int value can only supports up to 32 qubit system.
  6. qml.expval is the only measurement lightning.tensor support.
  7. Limited gradient support with parameter-shift. And a 100 qubits SEL circuit was tested on A100 80 GB GPU
  8. maxBondDim is default as 128.
  9. pip editable installation with PL_BACKEND="lightning_tensor" pip install -e ., given that cutensornet-cu12 is installed an venv env. Detailed instructions are on PR#756.
  10. lightning.tensor is also tested against all the tests in tests/ if the tested feature is supported in lightning.tensor. The skipped tests are tasks for the next step.

[SC-62440] [SC-62439] [SC-60329] [SC-60325]

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

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

Thanks @multiphaseCFD . A few more suggestions which can be address in follow-up PRs, so I'm approving already.

@multiphaseCFD multiphaseCFD requested review from maliasadi and removed request for maliasadi June 12, 2024 18:43
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Great work 🚀

@multiphaseCFD multiphaseCFD merged commit 75d9c92 into master Jun 12, 2024
98 checks passed
@multiphaseCFD multiphaseCFD deleted the add_pybind11_cutensornet branch June 12, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:use-multi-gpu-runner Enable usage of Multi-GPU runner for this Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants