28 typedef std::shared_ptr<QUnit>
QUnitPtr;
45 std::shared_ptr<std::default_random_engine> rgp =
nullptr);
47 virtual void SetQuantumState(
complex* inputState);
50 virtual std::map<QInterfacePtr, bitLenInt> Cohere(std::vector<QInterfacePtr> toCopy);
59 virtual void ApplySingleBit(
const complex* mtrx,
bool doCalcNorm,
bitLenInt qubit);
149 virtual void PhaseFlip();
153 bitLenInt valueLength,
unsigned char* values);
168 virtual void CopyState(QUnitPtr orig);
172 virtual void SetBit(
bitLenInt qubit1,
bool value);
179 void INCx(INCxFn fn, bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt flagIndex);
181 INCxxFn fn, bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt flag1Index, bitLenInt flag2Index);
183 QInterfacePtr Entangle(std::initializer_list<bitLenInt*> bits);
184 QInterfacePtr EntangleRange(bitLenInt start, bitLenInt length);
185 QInterfacePtr EntangleRange(bitLenInt start, bitLenInt length, bitLenInt start2, bitLenInt length2);
187 template <
class It>
QInterfacePtr EntangleIterator(It first, It last);
189 template <
typename F,
typename... B>
void EntangleAndCallMember(F fn, B... bits);
190 template <
typename F,
typename... B>
void EntangleAndCall(F fn, B... bits);
194 void Detach(bitLenInt start, bitLenInt length,
QInterfacePtr dest);
202 void SortUnit(
QInterfacePtr unit, std::vector<QSortEntry>& bits, bitLenInt low, bitLenInt high);
Definition: qunit.hpp:196
virtual void SetQubitCount(bitLenInt qb)
Definition: qinterface.hpp:103
bitLenInt mapped
Definition: qunit.hpp:198
QInterfacePtr unit
Definition: qunit.hpp:23
#define real1
Definition: qinterface.hpp:35
std::shared_ptr< QUnit > QUnitPtr
Definition: qunit.hpp:27
std::shared_ptr< std::default_random_engine > rand_generator
Definition: qunit.hpp:35
virtual void SetQubitCount(bitLenInt qb)
Definition: qunit.hpp:37
QInterfaceEngine engine
Definition: qunit.hpp:32
bool operator<(const QSortEntry &rhs)
Definition: qunit.hpp:199
#define complex
Definition: qinterface.hpp:34
std::vector< QEngineShard > shards
Definition: qunit.hpp:33
QInterfaceEngine
Enumerated list of supported engines.
Definition: qinterface.hpp:49
#define bitCapInt
Definition: qinterface.hpp:22
#define bitLenInt
Definition: qinterface.hpp:21
QInterfacePtr GetUnit(bitLenInt bit)
Definition: qunit.hpp:206
Associates a QInterface object with a set of bits.
Definition: qunit.hpp:22
A "Qrack::QInterface" is an abstract interface exposing qubit permutation state vector with methods t...
Definition: qinterface.hpp:94
bool operator>(const QSortEntry &rhs)
Definition: qunit.hpp:200
bitLenInt mapped
Definition: qunit.hpp:24
bitLenInt bit
Definition: qunit.hpp:197
std::shared_ptr< QInterface > QInterfacePtr
Definition: qinterface.hpp:41
virtual void SetPermutation(bitCapInt perm)
Set to a specific permutation.
Definition: qunit.hpp:48
Definition: complex16simd.hpp:21