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 qml.state() support to lightning.tensor #827

Merged
merged 139 commits into from
Aug 13, 2024
Merged

Conversation

multiphaseCFD
Copy link
Member

@multiphaseCFD multiphaseCFD commented Jul 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:

[SC-70248]

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

multiphaseCFD and others added 30 commits July 16, 2024 20:36
### 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]>
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 . LGTM, but I would tend to request adding a getDataVector function such as to reduce boilerplate in the unit tests (which could itself call getData though). I think we need both. What was the rationale for removing it?

@multiphaseCFD
Copy link
Member Author

multiphaseCFD commented Aug 12, 2024

Thanks @multiphaseCFD . LGTM, but I would tend to request adding a getDataVector function such as to reduce boilerplate in the unit tests (which could itself call getData though). I think we need both. What was the rationale for removing it?

Thanks @vincentmr ! The main reason is more product oriented. getData() will let our user to ensure that there is sufficient amount of host memory to store the state. It's the same logic of cutensornet, users have to be responsible for allocating sufficient amount of memory. Changes were made in lightning.tensor since the lack of host memory issue could be more prominent for the 100+ qubit MPS or Exact TN simulations. Will keep getDataVector().

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.

LGTM, nice work @multiphaseCFD .

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.

Nice work @multiphaseCFD! LGTM if you accept the suggestions before merge :)

@multiphaseCFD multiphaseCFD merged commit 09d626b into master Aug 13, 2024
86 of 87 checks passed
@multiphaseCFD multiphaseCFD deleted the add_accessor_ltensor branch August 13, 2024 12:55
multiphaseCFD added a commit that referenced this pull request Aug 13, 2024
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-70248]

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
Co-authored-by: Lee J. O'Riordan <[email protected]>
Co-authored-by: Ali Asadi <[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.

5 participants