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 stateprep support to lightning.tensor - MPS #849

Merged
merged 257 commits into from
Aug 22, 2024

Conversation

multiphaseCFD
Copy link
Member

@multiphaseCFD multiphaseCFD commented Aug 13, 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:

[SC-71278]

Add qml.StatePrep() and qml.QubitStateVector() support to lightning.tensor. Note that svd decomposition is conduct by numpy in the python layer based on the fact that svd operation with numpy on cpu is faster than cutensornet on A100 GPU if the bond dimension is less than 256. For more info, please visit here.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

multiphaseCFD and others added 30 commits July 17, 2024 18:22
### 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`](../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`.

- [x] Add a new entry to the `.github/CHANGELOG.md` file, summarizing
the
      change, and including a link back to the PR.

- [x] 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 GPU device compute capability check. L-Tensor has device compute
capability check like L-GPU now.
[SC-69118]

**Description of the Change:**

**Benefits:**

Error will be raised when running `lightning.tensor` on a unsupported
GPU.

**Possible Drawbacks:**

**Related GitHub Issues:**

#799

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Base automatically changed from add_probs_ltensor to master August 21, 2024 14:13
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.

Second round, cheers!

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.

LGMT, thanks @multiphaseCFD :)

@multiphaseCFD multiphaseCFD requested review from maliasadi and removed request for maliasadi August 21, 2024 19:29
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.

Thanks @multiphaseCFD! Just a few minor suggestions, but happy to get it merged soon

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.

🚀

multiphaseCFD and others added 10 commits August 21, 2024 21:22
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`](../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:**

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
@multiphaseCFD multiphaseCFD merged commit ee837d6 into master Aug 22, 2024
110 of 111 checks passed
@multiphaseCFD multiphaseCFD deleted the add_stateprep_ltensor branch August 22, 2024 21:32
multiphaseCFD added a commit that referenced this pull request Sep 8, 2024
### Before submitting

Please complete the following checklist when submitting a PR:

- [x] 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`](../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`.

- [x] Add a new entry to the `.github/CHANGELOG.md` file, summarizing
the
      change, and including a link back to the PR.

- [x] 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:**

[SC-71278]

Add `qml.StatePrep()` and `qml.QubitStateVector()` support to
`lightning.tensor`. Note that `svd` decomposition is conduct by `numpy`
in the python layer based on the fact that `svd` operation with `numpy`
on cpu is faster than `cutensornet` on `A100` GPU if the `bond
dimension` is less than `256`. For more info, please visit
[here](https://developer.nvidia.com/cuquantum-sdk).

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
Co-authored-by: Josh Izaac <[email protected]>
Co-authored-by: Lee J. O'Riordan <[email protected]>
Co-authored-by: Pietropaolo Frisoni <[email protected]>
Co-authored-by: erick-xanadu <[email protected]>
Co-authored-by: Astral Cai <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>
Co-authored-by: Shiro-Raven <[email protected]>
Co-authored-by: albi3ro <[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.

9 participants