QEngineCPU¶
Defined in qengine_cpu.hpp.
The API is provided by Qrack::QInterface, via Qrack::Engine. This is a general purpose implementation of Qrack::QInterface, without OpenCL.
-
Qrack::QEngineCPU::QEngineCPU(bitLenInt qBitCount, const bitCapInt &initState, qrack_rand_gen_ptr rgp = nullptr, const complex &phaseFac = CMPLX_DEFAULT_ARG, bool doNorm = false, bool randomGlobalPhase = true, bool ignored = false, int64_t ignored2 = -1, bool useHardwareRNG = true, bool ignored3 = false, real1_f norm_thresh = REAL1_EPSILON, std::vector<int64_t> ignored4 = {}, bitLenInt ignored5 = 0U, real1_f ignored6 = _qrack_qunit_sep_thresh)¶
Initialize a coherent unit with qBitCount number of bits, to initState unsigned integer permutation state, with a shared random number generator, with a specific phase.
(Note that “useHostMem” is required as a parameter to normalize constructors for use with the CreateQuantumInterface() factory, but it serves no function in QEngineCPU.)
Warning
Overall phase is generally arbitrary and unknowable. Setting two QEngineCPU instances to the same phase usually makes sense only if they are initialized at the same time.