Template Function Pennylane::Util::fillTrailingOnes

Function Documentation

template<class IntegerType = std::size_t>
inline constexpr auto Pennylane::Util::fillTrailingOnes(std::size_t nbits) -> IntegerType

Fill ones from LSB to nbits. Runnable in a compile-time and for any integer type.

Template Parameters

IntegerType – Integer type to use

Parameters

nbits – Number of bits to fill