From efd73ebfda4dcfa8c5f9d81fd6ad1ffa4efe0090 Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 11:31:23 -0400 Subject: [PATCH 01/11] update dev version --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 7671600d2c..eb9ad44099 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.37.0-dev17" +__version__ = "0.37.0-dev18" From 11f80c5aec6c527f4ac935664563cf0d660e8757 Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 11:43:47 -0400 Subject: [PATCH 02/11] touch backends --- pennylane_lightning/core/lightning_base.py | 2 +- pennylane_lightning/lightning_gpu/lightning_gpu.py | 2 +- pennylane_lightning/lightning_kokkos/lightning_kokkos.py | 2 +- pennylane_lightning/lightning_qubit/lightning_qubit.py | 2 +- pennylane_lightning/lightning_tensor/lightning_tensor.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pennylane_lightning/core/lightning_base.py b/pennylane_lightning/core/lightning_base.py index af45c04cc6..3b89439623 100644 --- a/pennylane_lightning/core/lightning_base.py +++ b/pennylane_lightning/core/lightning_base.py @@ -1,4 +1,4 @@ -# Copyright 2018-2023 Xanadu Quantum Technologies Inc. +# Copyright 2024 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pennylane_lightning/lightning_gpu/lightning_gpu.py b/pennylane_lightning/lightning_gpu/lightning_gpu.py index ed0bf14bcb..0f100cd31d 100644 --- a/pennylane_lightning/lightning_gpu/lightning_gpu.py +++ b/pennylane_lightning/lightning_gpu/lightning_gpu.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 Xanadu Quantum Technologies Inc. +# Copyright 2024 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pennylane_lightning/lightning_kokkos/lightning_kokkos.py b/pennylane_lightning/lightning_kokkos/lightning_kokkos.py index f0d8bead12..5b8c5d75f4 100644 --- a/pennylane_lightning/lightning_kokkos/lightning_kokkos.py +++ b/pennylane_lightning/lightning_kokkos/lightning_kokkos.py @@ -1,4 +1,4 @@ -# Copyright 2018-2023 Xanadu Quantum Technologies Inc. +# Copyright 2024 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pennylane_lightning/lightning_qubit/lightning_qubit.py b/pennylane_lightning/lightning_qubit/lightning_qubit.py index fff9d8acaf..eb2448d6c6 100644 --- a/pennylane_lightning/lightning_qubit/lightning_qubit.py +++ b/pennylane_lightning/lightning_qubit/lightning_qubit.py @@ -1,4 +1,4 @@ -# Copyright 2018-2024 Xanadu Quantum Technologies Inc. +# Copyright 2024 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pennylane_lightning/lightning_tensor/lightning_tensor.py b/pennylane_lightning/lightning_tensor/lightning_tensor.py index 831625e09f..55c0317cab 100644 --- a/pennylane_lightning/lightning_tensor/lightning_tensor.py +++ b/pennylane_lightning/lightning_tensor/lightning_tensor.py @@ -1,4 +1,4 @@ -# Copyright 2018-2024 Xanadu Quantum Technologies Inc. +# Copyright 2024 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # limitations under the License. """ This module contains the LightningTensor class that inherits from the new device interface. -It is a device to perform tensor network simulation of a quantum circuit. +It is a device to perform tensor network simulation of a quantum circuit. """ from dataclasses import replace from numbers import Number From d59df7eca16f882c8af6e66a7546662edaf70659 Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 12:57:01 -0400 Subject: [PATCH 03/11] remove piping error --- .github/workflows/tests_lkcuda_python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_lkcuda_python.yml b/.github/workflows/tests_lkcuda_python.yml index ceb92d5aa4..77e4136158 100644 --- a/.github/workflows/tests_lkcuda_python.yml +++ b/.github/workflows/tests_lkcuda_python.yml @@ -223,9 +223,9 @@ jobs: run: | cd main/ DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"` - PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS 2> /dev/null || echo Something went wrong with Pytest - pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append 2> /dev/null || echo Something went wrong with pl-device-test shot=20000 - pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append 2> /dev/null || echo Something went wrong with pl-device-test shot=None + PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS 2 + pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append 2 + pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append 2 mv coverage.xml coverage-${{ github.job }}-${{ matrix.pl_backend }}.xml - name: Install all backend devices From f65cc87de2f124f6884d963a4a65d861ef63f407 Mon Sep 17 00:00:00 2001 From: ringo-but-quantum Date: Fri, 24 May 2024 16:57:28 +0000 Subject: [PATCH 04/11] Auto update version from '0.37.0-dev18' to '0.37.0-dev19' --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index eb9ad44099..402445d990 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.37.0-dev18" +__version__ = "0.37.0-dev19" From a65a63d5f7ee4e8cb3183c64240609dfcb5fabab Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 13:06:50 -0400 Subject: [PATCH 05/11] remove -x --- .github/workflows/tests_lkcpu_python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_lkcpu_python.yml b/.github/workflows/tests_lkcpu_python.yml index 576e264d6c..deb557a040 100644 --- a/.github/workflows/tests_lkcpu_python.yml +++ b/.github/workflows/tests_lkcpu_python.yml @@ -246,7 +246,7 @@ jobs: python -m pip install pytest-xdist cd main/ DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"` - PL_DEVICE=${DEVICENAME} python -m pytest tests/ --exitfirst $COVERAGE_FLAGS --splits 7 --group ${{ matrix.group }} \ + PL_DEVICE=${DEVICENAME} python -m pytest tests/ $COVERAGE_FLAGS --splits 7 --group ${{ matrix.group }} \ --store-durations --durations-path='.github/workflows/python_lightning_kokkos_test_durations.json' --splitting-algorithm=least_duration mv .github/workflows/python_lightning_kokkos_test_durations.json ${{ github.workspace }}/.test_durations-${{ matrix.exec_model }}-${{ matrix.group }} pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append From 4044458911ca413f07c81eea554ac4bd315eee9d Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 13:14:41 -0400 Subject: [PATCH 06/11] typo --- .github/workflows/tests_lkcuda_python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_lkcuda_python.yml b/.github/workflows/tests_lkcuda_python.yml index 77e4136158..cf80bc2748 100644 --- a/.github/workflows/tests_lkcuda_python.yml +++ b/.github/workflows/tests_lkcuda_python.yml @@ -223,9 +223,9 @@ jobs: run: | cd main/ DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"` - PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS 2 - pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append 2 - pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append 2 + PL_DEVICE=${DEVICENAME} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS + pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append + pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append mv coverage.xml coverage-${{ github.job }}-${{ matrix.pl_backend }}.xml - name: Install all backend devices From c455b430375bfe117413adc66b4c49d36a91b8f3 Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 13:37:35 -0400 Subject: [PATCH 07/11] add lightning unit tests for all --- .github/workflows/tests_lkcuda_python.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_lkcuda_python.yml b/.github/workflows/tests_lkcuda_python.yml index cf80bc2748..66c2eaeddb 100644 --- a/.github/workflows/tests_lkcuda_python.yml +++ b/.github/workflows/tests_lkcuda_python.yml @@ -246,6 +246,7 @@ jobs: run: | cd main/ for device in lightning.qubit lightning.kokkos; do + PL_DEVICE=${device} python -m pytest tests/ -k "not test_native_mcm" $COVERAGE_FLAGS pl-device-test --device ${device} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append pl-device-test --device ${device} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append done From 4ea0ce1681c54e8aa10506e0dd31c828228998cd Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 14:34:56 -0400 Subject: [PATCH 08/11] downgrade Kokkos --- .../build_and_cache_Kokkos_linux.yml | 2 +- .github/workflows/set_wheel_build_matrix.yml | 2 +- .github/workflows/tests_lkcpu_python.yml | 2 +- .github/workflows/tests_lkcuda_cpp.yml | 4 ++-- .github/workflows/tests_lkcuda_python.yml | 4 ++-- .github/workflows/tests_windows_cpp.yml | 2 +- cmake/support_kokkos.cmake | 2 +- docker/Dockerfile | 2 +- .../gates/BasicGateFunctors.hpp | 16 +++++++------- .../gates/BasicGeneratorFunctors.hpp | 22 +++++++++---------- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build_and_cache_Kokkos_linux.yml b/.github/workflows/build_and_cache_Kokkos_linux.yml index 90d7b562a9..18b4e15f37 100644 --- a/.github/workflows/build_and_cache_Kokkos_linux.yml +++ b/.github/workflows/build_and_cache_Kokkos_linux.yml @@ -20,7 +20,7 @@ on: kokkos_version: required: false type: string - default: 4.3.01 + default: 4.2.00 outputs: exec_model: description: "The execution model for Kokkos." diff --git a/.github/workflows/set_wheel_build_matrix.yml b/.github/workflows/set_wheel_build_matrix.yml index 0f3c73fe17..d61af80f84 100644 --- a/.github/workflows/set_wheel_build_matrix.yml +++ b/.github/workflows/set_wheel_build_matrix.yml @@ -52,7 +52,7 @@ jobs: - name: Kokkos version id: kokkos_version - run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT + run: echo "kokkos_version=[\"4.2.00\"]" >> $GITHUB_OUTPUT outputs: python_version: ${{ steps.pyver.outputs.python_version }} diff --git a/.github/workflows/tests_lkcpu_python.yml b/.github/workflows/tests_lkcpu_python.yml index deb557a040..6c99095630 100644 --- a/.github/workflows/tests_lkcpu_python.yml +++ b/.github/workflows/tests_lkcpu_python.yml @@ -48,7 +48,7 @@ jobs: uses: ./.github/workflows/build_and_cache_Kokkos_linux.yml with: os: ubuntu-22.04 - kokkos_version: ${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }} #To be updated next Release. + kokkos_version: ${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.2.00' }} #To be updated next Release. build_lightning_kokkos_wheels: needs: [determine_runner, build_and_cache_Kokkos] diff --git a/.github/workflows/tests_lkcuda_cpp.yml b/.github/workflows/tests_lkcuda_cpp.yml index edb4d80e78..77a25896d1 100644 --- a/.github/workflows/tests_lkcuda_cpp.yml +++ b/.github/workflows/tests_lkcuda_cpp.yml @@ -43,7 +43,7 @@ jobs: matrix: os: [ubuntu-22.04] exec_model: ["CUDA"] - kokkos_version: ["4.3.01"] + kokkos_version: ["4.2.00"] steps: - name: Validate GPU version and installed compiler @@ -109,7 +109,7 @@ jobs: os: [ubuntu-22.04] pl_backend: ["lightning_kokkos"] exec_model: ["CUDA"] - kokkos_version: ["4.3.01"] + kokkos_version: ["4.2.00"] name: C++ Tests (${{ matrix.pl_backend }}, kokkos-${{ matrix.kokkos_version }}, model-${{ matrix.exec_model }}) runs-on: diff --git a/.github/workflows/tests_lkcuda_python.yml b/.github/workflows/tests_lkcuda_python.yml index 66c2eaeddb..70115ebb34 100644 --- a/.github/workflows/tests_lkcuda_python.yml +++ b/.github/workflows/tests_lkcuda_python.yml @@ -46,7 +46,7 @@ jobs: matrix: os: [ubuntu-22.04] exec_model: ["CUDA"] - kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }}"] #To be updated next Release. + kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.2.00' }}"] #To be updated next Release. steps: - name: Validate GPU version and installed compiler @@ -110,7 +110,7 @@ jobs: os: [ubuntu-22.04] pl_backend: ["lightning_kokkos", "all"] exec_model: ["CUDA"] - kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.3.01' }}"] #To be updated next Release. + kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.2.00' }}"] #To be updated next Release. name: Python Tests (${{ matrix.pl_backend }}, kokkos-${{ matrix.kokkos_version }}, model-${{ matrix.exec_model }}) runs-on: diff --git a/.github/workflows/tests_windows_cpp.yml b/.github/workflows/tests_windows_cpp.yml index eea4b25e0f..2a212d21a3 100644 --- a/.github/workflows/tests_windows_cpp.yml +++ b/.github/workflows/tests_windows_cpp.yml @@ -38,7 +38,7 @@ jobs: - name: Kokkos version id: kokkos_version - run: echo "kokkos_version=[\"4.3.01\"]" >> $GITHUB_OUTPUT + run: echo "kokkos_version=[\"4.2.00\"]" >> $GITHUB_OUTPUT outputs: exec_model: ${{ steps.exec_model.outputs.exec_model }} diff --git a/cmake/support_kokkos.cmake b/cmake/support_kokkos.cmake index 57978cdfd0..a628343de8 100644 --- a/cmake/support_kokkos.cmake +++ b/cmake/support_kokkos.cmake @@ -5,7 +5,7 @@ # Include this file only once include_guard() -set(KOKKOS_VERSION 4.3.01) +set(KOKKOS_VERSION 4.2.00) # Macro to aid in finding Kokkos with 3 potential install options: # 1. Fully integrated Kokkos packages and CMake module files diff --git a/docker/Dockerfile b/docker/Dockerfile index cec4284bef..436ac25ee0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,7 +20,7 @@ ARG AMD_ARCH=AMD_GFX90A ARG CUDA_ARCH=AMPERE80 ARG CUDA_INSTALLER=https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run ARG GCC_VERSION=11 -ARG KOKKOS_VERSION=4.3.01 +ARG KOKKOS_VERSION=4.2.00 ARG LIGHTNING_VERSION=v0.36.0 ARG ROCM_INSTALLER=https://repo.radeon.com/amdgpu-install/5.7/ubuntu/jammy/amdgpu-install_5.7.50700-1_all.deb RUN apt-get update \ diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp index 3898e5f15f..7c8a900fcf 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp @@ -23,7 +23,7 @@ /// @cond DEV namespace { using namespace Pennylane::Util; -using Kokkos::kokkos_swap; +using Kokkos::Experimental::swap; using Pennylane::Gates::GateOperation; } // namespace /// @endcond @@ -70,9 +70,9 @@ void applyPauliX(Kokkos::View *> arr_, applyNC1Functor( ExecutionSpace{}, arr_, num_qubits, wires, KOKKOS_LAMBDA(Kokkos::View *> arr, - const std::size_t i0, - const std::size_t i1) { kokkos_swap(arr(i0), arr(i1)); }); -} + const std::size_t i0, const std::size_t i1) { + Kokkos::Experimental::swap(arr(i0), arr(i1)); + }); template void applyPauliY(Kokkos::View *> arr_, @@ -318,7 +318,7 @@ void applyCNOT(Kokkos::View *> arr_, [[maybe_unused]] const std::size_t i00, [[maybe_unused]] const std::size_t i01, const std::size_t i10, const std::size_t i11) { - kokkos_swap(arr(i10), arr(i11)); + Kokkos::Experimental::swap(arr(i10), arr(i11)); }); } @@ -368,7 +368,7 @@ void applySWAP(Kokkos::View *> arr_, [[maybe_unused]] const std::size_t i00, const std::size_t i01, const std::size_t i10, [[maybe_unused]] const std::size_t i11) { - kokkos_swap(arr(i10), arr(i01)); + Kokkos::Experimental::swap(arr(i10), arr(i01)); }); } @@ -765,7 +765,7 @@ void applyCSWAP(Kokkos::View *> arr_, [[maybe_unused]] const std::size_t i100, const std::size_t i101, const std::size_t i110, [[maybe_unused]] const std::size_t i111) { - kokkos_swap(arr(i101), arr(i110)); + Kokkos::Experimental::swap(arr(i101), arr(i110)); }); } @@ -785,7 +785,7 @@ void applyToffoli(Kokkos::View *> arr_, [[maybe_unused]] const std::size_t i100, [[maybe_unused]] const std::size_t i101, const std::size_t i110, const std::size_t i111) { - kokkos_swap(arr(i111), arr(i110)); + Kokkos::Experimental::swap(arr(i111), arr(i110)); }); } diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGeneratorFunctors.hpp b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGeneratorFunctors.hpp index 1c20fa161b..7a543e459e 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGeneratorFunctors.hpp +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGeneratorFunctors.hpp @@ -23,7 +23,7 @@ /// @cond DEV namespace { using namespace Pennylane::Util; -using Kokkos::kokkos_swap; +using Kokkos::Experimental::swap; using Pennylane::Gates::GeneratorOperation; } // namespace /// @endcond @@ -76,7 +76,7 @@ void applyGenCRX(Kokkos::View *> arr_, const std::size_t i10, const std::size_t i11) { arr(i00) = ZERO(); arr(i01) = ZERO(); - kokkos_swap(arr(i10), arr(i11)); + Kokkos::Experimental::swap(arr(i10), arr(i11)); }); } @@ -129,8 +129,8 @@ void applyGenIsingXX( KOKKOS_LAMBDA(Kokkos::View *> arr, const std::size_t i00, const std::size_t i01, const std::size_t i10, const std::size_t i11) { - kokkos_swap(arr(i00), arr(i11)); - kokkos_swap(arr(i10), arr(i01)); + Kokkos::Experimental::swap(arr(i00), arr(i11)); + Kokkos::Experimental::swap(arr(i10), arr(i01)); }); } @@ -145,7 +145,7 @@ void applyGenIsingXY( KOKKOS_LAMBDA(Kokkos::View *> arr, const std::size_t i00, const std::size_t i01, const std::size_t i10, const std::size_t i11) { - kokkos_swap(arr(i10), arr(i01)); + Kokkos::Experimental::swap(arr(i10), arr(i01)); arr(i00) = ZERO(); arr(i11) = ZERO(); }); @@ -165,7 +165,7 @@ void applyGenIsingYY( const auto v00 = arr(i00); arr(i00) = -arr(i11); arr(i11) = -v00; - kokkos_swap(arr(i10), arr(i01)); + Kokkos::Experimental::swap(arr(i10), arr(i01)); }); } @@ -201,7 +201,7 @@ void applyGenSingleExcitation( arr(i01) *= IMAG(); arr(i10) *= -IMAG(); arr(i11) = ZERO(); - kokkos_swap(arr(i10), arr(i01)); + Kokkos::Experimental::swap(arr(i10), arr(i01)); }); } @@ -219,7 +219,7 @@ void applyGenSingleExcitationMinus( [[maybe_unused]] const std::size_t i11) { arr(i01) *= IMAG(); arr(i10) *= -IMAG(); - kokkos_swap(arr(i10), arr(i01)); + Kokkos::Experimental::swap(arr(i10), arr(i01)); }); } @@ -239,7 +239,7 @@ void applyGenSingleExcitationPlus( arr(i01) *= IMAG(); arr(i10) *= -IMAG(); arr(i11) *= -1; - kokkos_swap(arr(i10), arr(i01)); + Kokkos::Experimental::swap(arr(i10), arr(i01)); }); } @@ -307,7 +307,7 @@ void applyGenDoubleExcitationMinus( [[maybe_unused]] const std::size_t i1111) { arr(i0011) *= IMAG(); arr(i1100) *= -IMAG(); - kokkos_swap(arr(i1100), arr(i0011)); + Kokkos::Experimental::swap(arr(i1100), arr(i0011)); }); } @@ -337,7 +337,7 @@ void applyGenDoubleExcitationPlus( [[maybe_unused]] const std::size_t i1111) { arr(i0011) *= -IMAG(); arr(i1100) *= IMAG(); - kokkos_swap(arr(i1100), arr(i0011)); + Kokkos::Experimental::swap(arr(i1100), arr(i0011)); }); } From cdc0f81d3a2f6be43171bf92bb41d3e2096c51ed Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 14:37:13 -0400 Subject: [PATCH 09/11] downgrade Kokkos --- .github/workflows/tests_lkcpu_python.yml | 2 +- .github/workflows/tests_lkcuda_python.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_lkcpu_python.yml b/.github/workflows/tests_lkcpu_python.yml index 6c99095630..a66a7969e0 100644 --- a/.github/workflows/tests_lkcpu_python.yml +++ b/.github/workflows/tests_lkcpu_python.yml @@ -48,7 +48,7 @@ jobs: uses: ./.github/workflows/build_and_cache_Kokkos_linux.yml with: os: ubuntu-22.04 - kokkos_version: ${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.2.00' }} #To be updated next Release. + '4.2.00' #To be updated next Release. build_lightning_kokkos_wheels: needs: [determine_runner, build_and_cache_Kokkos] diff --git a/.github/workflows/tests_lkcuda_python.yml b/.github/workflows/tests_lkcuda_python.yml index 70115ebb34..9b42c1de25 100644 --- a/.github/workflows/tests_lkcuda_python.yml +++ b/.github/workflows/tests_lkcuda_python.yml @@ -46,7 +46,7 @@ jobs: matrix: os: [ubuntu-22.04] exec_model: ["CUDA"] - kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.2.00' }}"] #To be updated next Release. + kokkos_version: ["'4.2.00'"] #To be updated next Release. steps: - name: Validate GPU version and installed compiler @@ -110,7 +110,7 @@ jobs: os: [ubuntu-22.04] pl_backend: ["lightning_kokkos", "all"] exec_model: ["CUDA"] - kokkos_version: ["${{ inputs.lightning-version == 'stable' && '4.2.00' || '4.2.00' }}"] #To be updated next Release. + kokkos_version: ["'4.2.00'"] #To be updated next Release. name: Python Tests (${{ matrix.pl_backend }}, kokkos-${{ matrix.kokkos_version }}, model-${{ matrix.exec_model }}) runs-on: From e5969ed8ac9994dfc2bf2051d58d06c081ea7b22 Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 14:38:22 -0400 Subject: [PATCH 10/11] fix typo --- .github/workflows/tests_lkcpu_python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_lkcpu_python.yml b/.github/workflows/tests_lkcpu_python.yml index a66a7969e0..fcef377d74 100644 --- a/.github/workflows/tests_lkcpu_python.yml +++ b/.github/workflows/tests_lkcpu_python.yml @@ -48,7 +48,7 @@ jobs: uses: ./.github/workflows/build_and_cache_Kokkos_linux.yml with: os: ubuntu-22.04 - '4.2.00' #To be updated next Release. + kokkos_version: '4.2.00' #To be updated next Release. build_lightning_kokkos_wheels: needs: [determine_runner, build_and_cache_Kokkos] From 3f3f535731177b51aa641efda84d73a7242f4807 Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Fri, 24 May 2024 14:46:40 -0400 Subject: [PATCH 11/11] fix typo --- .../src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp index 7c8a900fcf..65029258bc 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/BasicGateFunctors.hpp @@ -73,6 +73,7 @@ void applyPauliX(Kokkos::View *> arr_, const std::size_t i0, const std::size_t i1) { Kokkos::Experimental::swap(arr(i0), arr(i1)); }); +} template void applyPauliY(Kokkos::View *> arr_,