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

[WIP] Get site_packages path with pybind11 API in C++ backend #701

Draft
wants to merge 211 commits into
base: master
Choose a base branch
from

Conversation

multiphaseCFD
Copy link
Member

@multiphaseCFD multiphaseCFD commented Apr 26, 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.


[SC-53754]
Context:

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@multiphaseCFD multiphaseCFD changed the title Get site_packages path with pybind11 API in C++ backend [WIP] Get site_packages path with pybind11 API in C++ backend Apr 26, 2024
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 97.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.06%. Comparing base (83ac9d8) to head (77a8b21).

Files Patch % Lines
..._lightning/core/src/utils/BLASLibLoaderManager.hpp 95.91% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #701      +/-   ##
==========================================
- Coverage   95.11%   95.06%   -0.06%     
==========================================
  Files         113       74      -39     
  Lines       18153    11524    -6629     
==========================================
- Hits        17267    10955    -6312     
+ Misses        886      569     -317     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@multiphaseCFD
Copy link
Member Author

Home/.local/ libs are missing when I tested catalyst against PR#701, which leads to the failures in Catalyst tests. I found that this is an issue created in the pybind11 repo here.

@multiphaseCFD multiphaseCFD added the ci:build_wheels Activate wheel building. label May 10, 2024
multiphaseCFD and others added 10 commits May 10, 2024 19:24
* Remove CPhase; Tidy up NDPermuter, gh scripts, and doc

* Add release_notes to docs

* Auto update version from '0.37.0-dev0' to '0.37.0-dev2'

* Update changelog

* Auto update version from '0.37.0-dev2' to '0.37.0-dev3'

* trigger ci

* Revert change in config.h

* Update

* Update

* Update

* Auto update version from '0.37.0-dev3' to '0.37.0-dev4'

* Fix _version

* Auto update version from '0.37.0-dev6' to '0.37.0-dev7'

* Update format

* trigger ci

---------

Co-authored-by: ringo-but-quantum <[email protected]>
* Update LQ's mcm workflow.

* Auto update version from '0.37.0-dev6' to '0.37.0-dev7'

* Update changelog

* trigger ci

* trigger ci

* Fix paths-ignore for python tests.

* Update .github/CHANGELOG.md

* Auto update version from '0.37.0-dev7' to '0.37.0-dev8'

---------

Co-authored-by: ringo-but-quantum <[email protected]>
maliasadi and others added 30 commits September 8, 2024 02:06
### 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`.

- [ ] 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 `aarch64` wheels recipes for `"lightning.gpu"`.

**Description of the Change:**

**Benefits:**
Users can pip install LGPU on ARM boxes.

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-60048]
[sc-60750]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
### 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`.

- [ ] 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]>
…legacy device for MPI LGPU (#864)

### 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!

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

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

- PR PennyLaneAI/pennylane#6021 removed code
duplication for `BasisEmbedding` and `BasisState`. As the result
`BasisState` no longer decomposes to `BasisStatePreparation`. This PR
updates Python unit tests to support this generalization of basis state
preparation.

- PR PennyLaneAI/pennylane#6046 added a facade
wrapper class for "legacy" devices. This PR is a follow up to PR #839
updating Multi-GPU LGPU device and tests.

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
### 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]>
### 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`.

- [x] 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:**
PR PennyLaneAI/pennylane#6042 adds support for
multi-controlled zyz.
For Lightning, this means that custom decompositions to special zyz with
multiple controlled wires will be supported.
 
**Description of the Change:**
- Add tests for adjoint jacobian of the controlled gate with multiple
controlled_wires.

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-67711]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
**Context:** The kokkos simulator needs to override the default
implementation for setting the state and basis state.

**Description of the Change:** Override the default implementation for
setting the state and basis state.

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
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!

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

- [x] 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:** Pybind11's 2.12 release is the first version to officially
support Numpy 2.0. This PR updates Lightning's pybind11 version to
ensure compatibility to/from numpy arrays.

**Description of the Change:** Updates Pybind11 version to the latest
(2.13.5)

**Benefits:** Ensures direct compatibility with numpy 2.x

**Possible Drawbacks:** None.

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
**Context:**
Tooling Team has requested that all CI checks for draft PRs across all
PennyLane repos are to be disabled to free up GH runner resources. [SC
Story](https://app.shortcut.com/xanaduai/story/66346/disable-ci-for-pl-draft-prs).

**Description of the Change:**
Conditions for checking whether a PR is in draft state have been added
to existing workflows.

**Benefits:**
Reduces GH runner usage.

**Possible Drawbacks:**
Some development steps are deferred to PRs in "ready for review" state
only.

**Related GitHub Issues:**
N/A

### Verification:
Created this PR as draft, only lightweight CI checks use GitHub runners
(formatting, changelog reminder). When marked as "ready for review" the
CI checks ran (excluding wheel builds and multi-gpu runners). When
labels added for wheel builds and multi-gpu runners all CI checks ran.

![Screenshot from 2024-08-12
15-26-32](https://github.com/user-attachments/assets/e78c24f8-8f31-46a0-91f6-eb2d1802694b)

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
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]>
**Context:** We have several occurrences of missing std namespace.

**Description of the Change:** Add std namespace to usual suspects.

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

[sc-71935]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Luis Alfredo Nuñez Meneses <[email protected]>
**Context:**
Update compatibility cron jobs for v0.38.0 release.
 
**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
…ation folder (#874)

**Context:** `configure_pyproject_toml.py` assumes it is being invoked
from the root directory of Lightning. But the reality is that it can be
invoked from anywhere else.

**Description of the Change:** Calculate safely the root folder by
traversing back the folder structure starting from the current file
location.

**Benefits:** The file can be invoked from any place.

---------

Co-authored-by: ringo-but-quantum <[email protected]>
### 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:**

[SC-72517]

Current implementation of `applyOperation` avoid the overhead of a
`cutensornetStateUpdateTensorOperator` call and the creation of a new
`DataBuffer` object. A new `gate_ids_` private data is added for the
quick generation of a new key, which does not exist in the `gate_cache`.

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Luis Alfredo Nuñez Meneses <[email protected]>
updated changelog and _version.py

---------

Co-authored-by: vincentmr <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
Co-authored-by: paul0403 <[email protected]>
Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Raul Torres <[email protected]>
### 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!

- [X] 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`.

- [X] 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:**
Following the design of *Lightning Qubit* uses the New Device API end to
end, we can now migrate `lightning.kokkos` device to the new device API.

**Description of the Change:**
Migration of Lightning Kokkos to integrate the New device API. The list
of main features changes are
- Add the `state_vector`, `measurements`, and `adjoint-jacobian` classes
for `lightning.kokkos`
- Add the `simulate`, `jacobian`, `simulate_and_jacobian`, `vjp`, and
`simulate_and_vjp` `methods to lighting.kokkos`
- Update unit/integration tests for the new device API to work with
`lightning.kokkos`
- Check the full support for sampling in full parity with Lightning
Qubit
- Replace the old device API for Lightning Kokkos.

**Benefits:**
Full integration of **Lightning kokkos** with the new device API. 

**Possible Drawbacks:**

**Related GitHub Issues:**

[sc-59207], [sc-68825]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
**Context:** GitHub Actions need to be updated.

**Description of the Change:** GH detected a
[high-severity](GHSA-cxww-7g56-2vh6)
vulnerability, with the download artifact action.

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**


[sc-72698]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
…okkos (#878)

**Context:**
Catalyst recently fixed a bug where recycling a device when a previous
execution involves stateprep causes a crash:
PennyLaneAI/catalyst#1047

The fix is made to `lightning.qubit`, and thus we need to fix it for
`lightning.kokkos` here as well.


**Description of the Change:**
In `LightningKokkosSimulator`, `SetState` and `SetBasisState` now
correctly query the DevQubits from the SimQubits in its qubit_manger's
map.

**Benefits:**
We can now have multiple qnode functions involving stateprep in a
workflow

**Possible Drawbacks:**

**Related GitHub Issues:**
PennyLaneAI/catalyst#1044

---------

Co-authored-by: paul0403 <[email protected]>
Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
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!

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

- [x] 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:**
Parallelizing over observables can accelerate adjoint Jacobian
calculations' backward pass. This PR revisits our implementation for
L-Qubit and L-GPU which are the two devices that support it. Certain
observables like Hamiltonian, PauliSentence, and LinearCombination can
be split into many observables, enabling the distribution of the cost of
expectation value computation. This strategy is initiated by the
serializer which partitions the observables if `split_obs` is not
`False`. The serializer proceeds to a complete partitioning, meaning a
1000-PauliWord PauliSentence is partitioned into a 1000 PauliWords. We
note in passing that L-Qubit does not split observables since it does
not pass a `split_obs` value to `_process_jacobian_tape`. This is
wasteful because we end up with either of two situations:

- The Jacobian is computed N processes (threads, devices, etc.) at a
time which results in a lot of duplicate computation (forward/backward
passes are repeated and the results combined);
- The Jacobian is parallelized over all observables, each of which
requires a state vector copy which increases the memory requirements by
as much.

We explore chunking instead of full partitioning for
LinearCombination-like objects, meaning a 1000-PauliWord PauliSentence
is partitioned into four 250-PauliWords PauliSentences if we parallelize
over 4 processes.

**Description of the Change:**
Modify the serializer to chunk LinearCombination-like objects if
`self.split_obs` is truthy.
Correctly route `_batch_obs` such that L-Qubit splits observables.
Enhance/adapt tests.

**Analysis:**
**Lightning-Qubit**

`applyObservable` is a bottleneck for somewhat large linear combinations
(say 100s or 1000s of terms). Chunking isn't helpful for a circuit like
```
    @qml.qnode(dev, diff_method="adjoint")
    def c(weights):
        qml.templates.AllSinglesDoubles(weights, wires, hf_state, singles, doubles)
        return qml.expval(ham)
```
because L-Qubit's `applyObservable` method is parallelized over terms
for a single `Hamiltonian` observable. Chunking in this case is
counter-productive because it requires extra state vectors, extra
backward passes, etc.

For a circuit like however
```
    @qml.qnode(dev, diff_method="adjoint")
    def c(weights):
        qml.templates.AllSinglesDoubles(weights, wires, hf_state, singles, doubles)
        return np.array([qml.expval(ham), qml.expval(qml.PauliZ(0))])
```
`applyObservable` is parallelized over observables, which only scales up
to 2 threads, and with poor load-balance. In this case, it is better to
split the observable, which is what the current changes do.

| mol | master-serial | master-batched | chunk-serial | chunk-batched |
| --- | ------------- | -------------- | ------------ | ------------- |
| CH4 | 1.793e+01     | 1.330e+01      | 1.819e+01    | 8.040e+00     |
| Li2 | 5.333e+01     | 3.354e+01      | 5.289e+01    | 1.839e+01     |
| CO  | 9.817e+01     | 5.945e+01      | 9.619e+01    | 2.559e+01     |
| H10 | 1.220e+02     | 7.317e+01      | 1.182e+02    | 3.305e+01     |

So for this circuit the current PR yields speeds-up ranging from 1.5x to
>2x by using obs-batching + chunking (compared with the previous
obs-batching).

**Lightning-GPU**

Lightning-GPU splits the observables as soon as `batch_obs` is true. The
current code splits a Hamiltonian into all its individual terms, which
is quite inefficient and induces a lot of redundant backward passes.
This is visible benchmarking the circuit
```
    @qml.qnode(dev, diff_method="adjoint")
    def c(weights):
        qml.templates.AllSinglesDoubles(weights, wires, hf_state, singles, doubles)
        return qml.expval(ham)
```

| mol | master-serial | master-batched | chunk-serial | chunk-batched |
| --- | ------------- | -------------- | ------------ | ------------- |
| CH4 | 1.463e+01     | forever        | 5.583e+00    | 3.405e+00     |
| Li2 | 1.201e+01     | forever        | 5.284e+00    | 2.658e+00     |
| CO  | 2.357e+01     | forever        | 4.716e+00    | 4.577e+00     |
| H10 | 2.992e+01     | forever        | 5.476e+00    | 5.469e+00     |
| HCN | 8.622e+01     | forever        | 3.144e+01    | 2.452e+01     |

The batched L-GPU runs are using 2 x A100 GPUs on ISAIC. The speed-ups
for batched versus serial are OK, but most important is the optimization
of `Hamiltonian::applyInPlace` which brings about nice speed-ups between
master and this PR.

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>
Co-authored-by: AmintorDusko <[email protected]>
… stable installation of LQ & LK (#890)

### 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`.

- [ ] 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]>
Co-authored-by: Amintor Dusko <[email protected]>
### 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 controlled gate support to `lightning.tensor`. This could improve
the performance of `lightning.tensor` by avoiding full gate matrix build
for controlled gates. However, as of v24.08, cutensornet only supports
controlled gates with only 1 wire target. [SC-72522]

**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]>
### 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`.

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

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

- [x] 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:** This PR removes support for Python 3.9 and migrates to 3.10
as the oldest supported version.

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build_wheels Activate wheel building.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants