QHybrid

Defined in qhybrid.hpp.

Qrack::QHybrid is a Qrack::Engine that switches between QEngineCPU and QEngineOCL as optimal. It may be used as sub-engine type with Qrack::QUnit. It supports the standard Qrack::QInterface API.

The parameter “qubitThreshold” is the number of qubits at which QHybrid will automatically switch to GPU operation. A value of “0” will automatically pick this threshold based on best estimates of efficiency.

Warning

doxygenfunction: Unable to resolve function “Qrack::QHybrid::QHybrid” with arguments (bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector<int>, bitLenInt) in doxygen xml output for project “qrack” from directory: /tmp/qrack/doc/xml. Potential matches:

- QHybrid(bitLenInt qBitCount, bitCapInt initState = 0U, qrack_rand_gen_ptr rgp = nullptr, complex phaseFac = CMPLX_DEFAULT_ARG, bool doNorm = false, bool randomGlobalPhase = true, bool useHostMem = false, int64_t deviceId = -1, bool useHardwareRNG = true, bool useSparseStateVec = false, real1_f norm_thresh = REAL1_EPSILON, std::vector<int64_t> devList = {}, bitLenInt qubitThreshold = 0U, real1_f ignored2 = FP_NORM_EPSILON_F)
inline void Qrack::QHybrid::SwitchModes(bool useGpu, bool usePager)