From 9e2f805024b98077472dc052aac1c715d8ab99eb Mon Sep 17 00:00:00 2001 From: Haochen Wang Date: Fri, 26 Jul 2024 10:54:11 -0400 Subject: [PATCH] Marking the `std::mt19937 *gen` argument in `runtime/include/QuantumDevice.hpp/SetDevicePRNG(std::mt19937 *gen)` as `[[maybe_unused]]`, as some devices (e.g. openqasm and oqc) do not support seeding has this argument has no effect in the default implementation of this setter. At a more superficial level, this is to make the tests in https://github.com/PennyLaneAI/pennylane-lightning/pull/819 pass. --- runtime/include/QuantumDevice.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/include/QuantumDevice.hpp b/runtime/include/QuantumDevice.hpp index 783842805f..9ecd4718ce 100644 --- a/runtime/include/QuantumDevice.hpp +++ b/runtime/include/QuantumDevice.hpp @@ -122,7 +122,7 @@ struct QuantumDevice { * * @param gen The std::mt19937 PRNG object. */ - virtual void SetDevicePRNG(std::mt19937 *gen){}; + virtual void SetDevicePRNG([[maybe_unused]] std::mt19937 *gen){}; /** * @brief Start recording a quantum tape if provided.