Skip to content

Commit

Permalink
Marking the std::mt19937 *gen argument in `runtime/include/QuantumD…
Browse files Browse the repository at this point in the history
…evice.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 PennyLaneAI/pennylane-lightning#819 pass.
  • Loading branch information
paul0403 committed Jul 26, 2024
1 parent a49e0bc commit 9e2f805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/include/QuantumDevice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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){};

Check warning on line 125 in runtime/include/QuantumDevice.hpp

View check run for this annotation

Codecov / codecov/patch

runtime/include/QuantumDevice.hpp#L125

Added line #L125 was not covered by tests

/**
* @brief Start recording a quantum tape if provided.
Expand Down

0 comments on commit 9e2f805

Please sign in to comment.