diff --git a/include/__factory.hpp b/include/__factory.hpp index 7e7469f..5de38e1 100644 --- a/include/__factory.hpp +++ b/include/__factory.hpp @@ -1,6 +1,7 @@ #ifndef __FAST_PAULI_FACTORY_HPP #define __FAST_PAULI_FACTORY_HPP +#include #include #include #include @@ -85,11 +86,13 @@ auto rand(std::vector &blob, std::array extents) { if constexpr (is_complex::value) { std::uniform_real_distribution dis(0, 1.0); - std::ranges::generate(blob, [&]() { return T{dis(gen), dis(gen)}; }); + std::generate(blob.begin(), blob.end(), [&]() { + return T{dis(gen), dis(gen)}; + }); } else { std::uniform_real_distribution dis(0, 1.0); - std::ranges::generate(blob, [&]() { return T{dis(gen)}; }); + std::generate(blob.begin(), blob.end(), [&]() { return T{dis(gen)}; }); } return std::mdspan>(blob.data(), extents); diff --git a/include/__pauli.hpp b/include/__pauli.hpp index 1c01443..0dad92d 100644 --- a/include/__pauli.hpp +++ b/include/__pauli.hpp @@ -161,7 +161,7 @@ struct Pauli { // Adding specialization to the fmt library so we can easily print Pauli namespace fmt { -template <> struct fmt::formatter { +template <> struct formatter { constexpr auto parse(format_parse_context &ctx) { return ctx.begin(); } template @@ -190,7 +190,7 @@ template <> struct fmt::formatter { // Add complex numbers because they aren't in there already, TODO __pauli.hpp // may not be the best place for these -template <> struct fmt::formatter> { +template <> struct formatter> { constexpr auto parse(format_parse_context &ctx) { return ctx.begin(); } template diff --git a/include/__pauli_string.hpp b/include/__pauli_string.hpp index 9060b4d..1e63934 100644 --- a/include/__pauli_string.hpp +++ b/include/__pauli_string.hpp @@ -452,7 +452,7 @@ std::vector calculate_pauli_strings_max_weight(size_t n_qubits, namespace fmt { // -template <> struct fmt::formatter { +template <> struct formatter { constexpr auto parse(format_parse_context &ctx) { return ctx.begin(); } template