Template Function Pennylane::Util::fillTrailingOnes

Function Documentation

template<class IntegerType = size_t>
inline constexpr auto Pennylane::Util::fillTrailingOnes(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