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);
100 virtual void RT(
double radians,
bitLenInt qubit);
101 virtual void RX(
double radians,
bitLenInt qubit);
103 virtual void RY(
double radians,
bitLenInt qubit);
105 virtual void RZ(
double radians,
bitLenInt qubit);
147 virtual void PhaseFlip();
151 bitLenInt valueLength,
unsigned char* values);
166 virtual void CopyState(QUnitPtr orig);
169 virtual double ProbAll(
bitCapInt fullRegister);
170 virtual void SetBit(
bitLenInt qubit1,
bool value);
177 void INCx(INCxFn fn, bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt flagIndex);
179 INCxxFn fn, bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt flag1Index, bitLenInt flag2Index);
181 QInterfacePtr Entangle(std::initializer_list<bitLenInt*> bits);
182 QInterfacePtr EntangleRange(bitLenInt start, bitLenInt length);
183 QInterfacePtr EntangleRange(bitLenInt start, bitLenInt length, bitLenInt start2, bitLenInt length2);
185 template <
class It>
QInterfacePtr EntangleIterator(It first, It last);
187 template <
typename F,
typename... B>
void EntangleAndCallMember(F fn, B... bits);
188 template <
typename F,
typename... B>
void EntangleAndCall(F fn, B... bits);
192 void Detach(bitLenInt start, bitLenInt length,
QInterfacePtr dest);
200 void SortUnit(
QInterfacePtr unit, std::vector<QSortEntry>& bits, bitLenInt low, bitLenInt high);
Definition: qunit.hpp:194
virtual void SetQubitCount(bitLenInt qb)
Definition: qinterface.hpp:86
bitLenInt mapped
Definition: qunit.hpp:196
QInterfacePtr unit
Definition: qunit.hpp:23
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:197
#define complex
Definition: qinterface.hpp:30
std::vector< QEngineShard > shards
Definition: qunit.hpp:33
QInterfaceEngine
Enumerated list of supported engines.
Definition: qinterface.hpp:42
#define bitCapInt
Definition: qinterface.hpp:21
#define bitLenInt
Definition: qinterface.hpp:20
QInterfacePtr GetUnit(bitLenInt bit)
Definition: qunit.hpp:204
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:81
bool operator>(const QSortEntry &rhs)
Definition: qunit.hpp:198
bitLenInt mapped
Definition: qunit.hpp:24
bitLenInt bit
Definition: qunit.hpp:195
std::shared_ptr< QInterface > QInterfacePtr
Definition: qinterface.hpp:34
virtual void SetPermutation(bitCapInt perm)
Set to a specific permutation.
Definition: qunit.hpp:48
Definition: complex16simd.hpp:21