Skip to content

Commit

Permalink
Remove Scipy config file in LQ (#775)
Browse files Browse the repository at this point in the history
### 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!

- [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:**
Remove the required scipy config file used for the shots-based
measurement processes in LQ. The support is now maintained by passing
`SCIPY_LIBS_PATH` to the compiler.

**Description of the Change:**
Use `add_compile_definitions` to pass the variable to the compiler
instead of hardcoding it in `config.h`.

**Benefits:**
- Remove `config.h` from LQ distro package
- No need to run `git restore config.h` before each commit

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: ringo-but-quantum <[email protected]>
  • Loading branch information
maliasadi and ringo-but-quantum authored Jun 25, 2024
1 parent adef274 commit 042fa7c
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 54 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
* Remove the daily schedule from the "Compat Check w/PL - release/release" GitHub action.
[(#746)](https://github.com/PennyLaneAI/pennylane-lightning/pull/746)

* Remove the required `scipy` config file for LightningQubit. The support is now maintained by passing `SCIPY_LIBS_PATH` to the compiler.
[(#775)](https://github.com/PennyLaneAI/pennylane-lightning/pull/775)

### Documentation

* Add installation instructions and documentation for `lightning.tensor`.
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ doc/code/api/
kokkos/
PennyLane_Lightning_Kokkos.egg-info/
PennyLane_Lightning.egg-info/
pennylane_lightning/core/src/utils/config.h
prototypes/
tests/__pycache__/
venv/
venv/
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ if(ENABLE_LAPACK)
message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}")
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pennylane_lightning/core/src/utils/config.h.in
${CMAKE_CURRENT_SOURCE_DIR}/pennylane_lightning/core/src/utils/config.h)
add_compile_definitions(SCIPY_LIBS_PATH="${SCIPYLIBS}")

message(STATUS "Python scipy-lib path: ${SCIPYLIBS}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.37.0-dev47"
__version__ = "0.37.0-dev48"
2 changes: 0 additions & 2 deletions pennylane_lightning/core/src/utils/UtilLinearAlg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

#include "SharedLibLoader.hpp"

#include "config.h"

/// @cond DEV
namespace {
// Declare heev function pointers to access corresponding functions in
Expand Down
23 changes: 0 additions & 23 deletions pennylane_lightning/core/src/utils/config.h

This file was deleted.

24 changes: 0 additions & 24 deletions pennylane_lightning/core/src/utils/config.h.in

This file was deleted.

0 comments on commit 042fa7c

Please sign in to comment.