Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3b42657
Update dependencies
josephleekl Feb 23, 2026
b742617
Auto update version from '0.45.0-dev19' to '0.45.0-dev20'
ringo-but-quantum Feb 23, 2026
c89477e
Merge branch 'master' into update-deps-feb2026
josephleekl Feb 23, 2026
b4f2816
Auto update version from '0.45.0-dev20' to '0.45.0-dev21'
ringo-but-quantum Feb 23, 2026
24fb952
scipyopenblas update
josephleekl Feb 23, 2026
199c13d
try 2.11
josephleekl Feb 23, 2026
20c9edc
Merge branch 'master' into update-deps-feb2026
josephleekl Feb 25, 2026
2b58619
Auto update version from '0.45.0-dev21' to '0.45.0-dev22'
ringo-but-quantum Feb 25, 2026
9033a37
test
josephleekl Feb 25, 2026
939ff3e
update changelog
josephleekl Feb 25, 2026
946dec3
fix cmakelist and setup.py
josephleekl Feb 25, 2026
0c6f56e
Update CMakeLists.txt
josephleekl Feb 25, 2026
71369a1
Update CMakeLists.txt
josephleekl Feb 25, 2026
972e0fe
lk action cmake from pip;
josephleekl Feb 25, 2026
ea2027b
trigger CI
josephleekl Feb 25, 2026
6326a0c
trigger CI
josephleekl Feb 26, 2026
0cc650e
add gfortran
josephleekl Feb 26, 2026
d1ffc89
debug
josephleekl Feb 26, 2026
d9fc77a
debug more
josephleekl Feb 26, 2026
507bdbf
debug more 2
josephleekl Feb 26, 2026
8735e0e
test debug 3
josephleekl Feb 26, 2026
3141a22
fix test 4
josephleekl Feb 26, 2026
34f865f
test
josephleekl Feb 26, 2026
7bc1ca6
we back
josephleekl Feb 26, 2026
ecca36a
Apply suggestions from code review
josephleekl Mar 2, 2026
47b87e7
catch2 update to v3
josephleekl Mar 2, 2026
20df1d9
granular include catch header
josephleekl Mar 2, 2026
8bf36fc
add maybe_unused
josephleekl Mar 2, 2026
acf3c29
update changelog
josephleekl Mar 2, 2026
c402480
trigger CI
josephleekl Mar 2, 2026
a64ea1b
update
josephleekl Mar 2, 2026
bb7f172
Merge branch 'master' into update-deps-feb2026
josephleekl Mar 3, 2026
396c961
Auto update version from '0.45.0-dev22' to '0.45.0-dev23'
ringo-but-quantum Mar 3, 2026
28c623e
fixed order test for MPI cpp tests
josephleekl Mar 3, 2026
c958bd0
Merge branch 'update-deps-feb2026' into update-catch2-v3
josephleekl Mar 3, 2026
5e700bc
Merge branch 'master' into update-catch2-v3
josephleekl Mar 6, 2026
24560d4
Auto update version from '0.45.0-dev25' to '0.45.0-dev26'
ringo-but-quantum Mar 6, 2026
3bbae4a
trigger CI
josephleekl Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

<h3>Internal changes ⚙️</h3>

- Update Catch2 testing framework to v3.11.
[(#1350)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1350)

- Update internal dependencies versions for Nanobind (2.11), cmake (3.26), sphinxcontrib-htmlhelp (2.1.0)
[(#1347)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1347)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpumpi_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
mkdir -p ./tests/results
test_status=0
for file in *runner ; do ./$file --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
for file in *runner_mpi ; do mpirun -np 2 ./$file --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
for file in *runner_mpi ; do mpirun -np 2 ./$file --order decl --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
if [ $test_status -ne 0 ]; then
echo "Tests failed. Exiting with error code."
exit 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_lkmpi_cuda_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ jobs:
mkdir -p ./tests/results
test_status=0
for file in *runner ; do ./$file --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
for file in lightning_kokkos*runner_mpi ; do mpirun -np 4 ./$file --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
for file in utils_*runner_mpi ; do mpirun -np 2 ./$file --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
for file in lightning_kokkos*runner_mpi ; do mpirun -np 4 ./$file --order decl --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
for file in utils_*runner_mpi ; do mpirun -np 2 ./$file --order decl --reporter junit --out ./tests/results/report_$file.xml && echo "Test $file Success!" || { cat ./tests/results/report_$file.xml; test_status=1; } done;
if [ $test_status -ne 0 ]; then
echo "Tests failed. Exiting with error code."
exit 1
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,23 +156,23 @@ test-cpp-mpi:
$(OPTIONS)
ifdef target
cmake --build ./BuildTests $(VERBOSE) --target $(target)
mpirun -np 2 ./BuildTests/$(target)
mpirun -np 2 ./BuildTests/$(target) --order decl
else
cmake --build ./BuildTests $(VERBOSE)

if [ "$(PL_BACKEND)" = "lightning_gpu" ]; then \
for file in ./BuildTests/*_test_runner_mpi; do \
echo "Running $$file"; \
mpirun -np 2 $$file ; \
mpirun -np 2 $$file --order decl ; \
done ; \
elif [ "$(PL_BACKEND)" = "lightning_kokkos" ]; then \
for file in ./BuildTests/lightning_kokkos*test_runner_mpi; do \
echo "Running $$file"; \
mpirun -np 4 $$file ; \
mpirun -np 4 $$file --order decl ; \
done ; \
for file in ./BuildTests/utils_test_runner_mpi; do \
echo "Running $$file"; \
mpirun -np 2 $$file ; \
mpirun -np 2 $$file --order decl ; \
done; \
fi
endif
Expand Down
6 changes: 3 additions & 3 deletions cmake/support_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ macro(FetchAndIncludeCatch)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.10
GIT_TAG v3.11.0
)

FetchContent_MakeAvailable(Catch2)
Expand All @@ -22,7 +22,7 @@ macro(FetchAndIncludeCatch)
set_target_properties(Catch2 PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${CATCH2_IID}")

# Required for catch_discover_tests() and include(Catch)
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/contrib)
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)

include(Catch)
endmacro()
Expand All @@ -48,4 +48,4 @@ macro(ProcessTestOptions target_name)
message(STATUS "ENABLE_NATIVE is ON. Use -march=native for cpptests.")
target_compile_options(${target_name} INTERFACE -march=native)
endif()
endmacro()
endmacro()
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.45.0-dev25"
__version__ = "0.45.0-dev26"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>

#include "Error.hpp" // LightningException
#include "JacobianData.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>

#include "JacobianData.hpp"
#include "TestHelpers.hpp" //PLApprox
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define CATCH_CONFIG_RUNNER
#include <catch2/catch.hpp>
#include <catch2/catch_session.hpp>
#include <mpi.h>

int main(int argc, char *argv[]) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_session.hpp>

int main(int argc, char *argv[]) { return Catch::Session().run(argc, argv); }
2 changes: 1 addition & 1 deletion pennylane_lightning/core/bindings/BindingsMPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ void registerBackendAgnosticAlgorithmsMPI(nb::module_ &m) {
*
* @param m Nanobind module
*/
inline void registerInfoMPI(nb::module_ &m) {
inline void registerInfoMPI([[maybe_unused]] nb::module_ &m) {
// This function is now empty - MPI manager registration moved to
// backend-specific
}
Expand Down
15 changes: 9 additions & 6 deletions pennylane_lightning/core/catalyst/tests/Test_LightningDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
// limitations under the License.

#include "TestHelpers.hpp"
#include "catch2/catch.hpp"
#include <algorithm>
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
#include <numeric>
#include <string>

Expand Down Expand Up @@ -162,7 +163,7 @@ TEST_CASE("Check an unsupported operation", "[Driver]") {
REQUIRE_THROWS_WITH(
Lightning::lookup_gates(Lightning::simulator_gate_info,
"UnsupportedGateName"),
Catch::Contains(
Catch::Matchers::ContainsSubstring(
"The given operation is not supported by the simulator"));
}

Expand Down Expand Up @@ -447,8 +448,9 @@ TEST_CASE("Cannot reuse entangled qubit when allocating", "[Driver]") {

REQUIRE_THROWS_WITH(
sim->AllocateQubit(),
Catch::Contains("Cannot reuse qubit: qubit is entangled with remaining "
"qubits. Release qubits must be disentangled."));
Catch::Matchers::ContainsSubstring(
"Cannot reuse qubit: qubit is entangled with remaining "
"qubits. Release qubits must be disentangled."));
}

TEST_CASE("Release one qubit from entangled qubits", "[Driver]") {
Expand Down Expand Up @@ -478,8 +480,9 @@ TEST_CASE("Release one qubit from entangled qubits", "[Driver]") {

REQUIRE_THROWS_WITH(
sim->PartialProbs(probs_view, {static_qubits[0], static_qubits[1]}),
Catch::Contains("Cannot release qubits: released qubits are entangled "
"with remaining qubits"));
Catch::Matchers::ContainsSubstring(
"Cannot release qubits: released qubits are entangled "
"with remaining qubits"));
}

TEST_CASE("Release all entangled qubits", "[Driver]") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include <optional>
#include <set>

#include "catch2/catch.hpp"
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>

#include "LightningQubitManager.hpp"

Expand Down Expand Up @@ -98,12 +99,14 @@ TEST_CASE("Test lightning qubit manager invalid IDs", "[Utils]") {
size_t device_qubit_id = 0;

QubitIdType q = manager.Allocate(device_qubit_id);
REQUIRE_THROWS_WITH(manager.getProgramId(device_qubit_id + 42),
Catch::Contains("Invalid device qubit ID"));
REQUIRE_THROWS_WITH(manager.getDeviceId(q + 42),
Catch::Contains("Invalid program qubit ID"));

REQUIRE_THROWS_WITH(
manager.Release(q + 42),
Catch::Contains("Cannot release qubit, the given ID is invalid"));
manager.getProgramId(device_qubit_id + 42),
Catch::Matchers::ContainsSubstring("Invalid device qubit ID"));
REQUIRE_THROWS_WITH(
manager.getDeviceId(q + 42),
Catch::Matchers::ContainsSubstring("Invalid program qubit ID"));

REQUIRE_THROWS_WITH(manager.Release(q + 42),
Catch::Matchers::ContainsSubstring(
"Cannot release qubit, the given ID is invalid"));
}
5 changes: 3 additions & 2 deletions pennylane_lightning/core/catalyst/tests/runner_catalyst.cpp
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_session.hpp>

int main(int argc, char *argv[]) { return Catch::Session().run(argc, argv); }
Loading
Loading