Qrack  9.0
General classical-emulating-quantum development framework
qengine_gpu_util.hpp
Go to the documentation of this file.
1 //
3 // (C) Daniel Strano and the Qrack contributors 2017-2023. All rights reserved.
4 //
5 // This is a multithreaded, universal quantum register simulation, allowing
6 // (nonphysical) register cloning and direct measurement of probability and
7 // phase, to leverage what advantages classical emulation of qubits can have.
8 //
9 // Licensed under the GNU Lesser General Public License V3.
10 // See LICENSE.md in the project root or https://www.gnu.org/licenses/lgpl-3.0.en.html
11 // for details.
12 
13 #pragma once
14 
15 #include <string>
16 
17 namespace Qrack {
18 
20 
21 class bad_alloc : public std::bad_alloc {
22 private:
23  std::string m;
24 
25 public:
26  bad_alloc(std::string message)
27  : m(message)
28  {
29  // Intentionally left blank.
30  }
31 
32  const char* what() const noexcept { return m.c_str(); }
33 };
34 } // namespace Qrack
Definition: qengine_gpu_util.hpp:21
const char * what() const noexcept
Definition: qengine_gpu_util.hpp:32
bad_alloc(std::string message)
Definition: qengine_gpu_util.hpp:26
std::string m
Definition: qengine_gpu_util.hpp:23
Definition: complex16x2simd.hpp:25
SPECIAL_2X2
Definition: qengine_gpu_util.hpp:19
@ PHASE
Definition: qengine_gpu_util.hpp:19
@ INVERT
Definition: qengine_gpu_util.hpp:19
@ PAULIX
Definition: qengine_gpu_util.hpp:19
@ NONE
Definition: qengine_gpu_util.hpp:19
@ PAULIZ
Definition: qengine_gpu_util.hpp:19