89 const std::vector<bitLenInt>& controls) = 0;
92 const std::vector<bitLenInt>& controls) = 0;
95 bitLenInt length,
const std::vector<bitLenInt>& controls) = 0;
98 bitLenInt length,
const std::vector<bitLenInt>& controls) = 0;
101 bitLenInt length,
const std::vector<bitLenInt>& controls) = 0;
171 bitLenInt valueLength,
const unsigned char* values,
bool resetValue =
true) = 0;
virtual bool M(bitLenInt qubitIndex)=0
virtual void X(bitLenInt qubitIndex)=0
virtual void INCS(const bitCapInt &toAdd, bitLenInt start, bitLenInt length, bitLenInt overflowIndex)=0
Add a classical integer to the register, with sign and without carry.
virtual void INCDECSC(const bitCapInt &toMod, bitLenInt start, bitLenInt length, bitLenInt carryIndex)=0
Common driver method behind INCSC and DECSC (without overflow flag)
virtual void IMULModNOut(const bitCapInt &toMul, const bitCapInt &modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length)=0
Inverse of multiplication modulo N by integer, (out of place)
virtual void INCDECBCDC(const bitCapInt &toMod, bitLenInt start, bitLenInt length, bitLenInt carryIndex)=0
Common driver method behind INCSC and DECSC (without overflow flag)
virtual void CINC(const bitCapInt &toAdd, bitLenInt start, bitLenInt length, const std::vector< bitLenInt > &controls)=0
Add integer (without sign, with controls)
virtual bitCapInt IndexedSBC(bitLenInt indexStart, bitLenInt indexLength, bitLenInt valueStart, bitLenInt valueLength, bitLenInt carryIndex, const unsigned char *values)=0
Subtract from an entangled 8 bit register state with a superposed index-offset-based read from classi...
virtual bitCapInt IndexedLDA(bitLenInt indexStart, bitLenInt indexLength, bitLenInt valueStart, bitLenInt valueLength, const unsigned char *values, bool resetValue=true)=0
Set 8 bit register bits by a superposed index-offset-based read from classical memory.
virtual void INCC(const bitCapInt &toAdd, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
Add integer (without sign, with carry)
Definition: qalu.cpp:46
virtual void DECS(const bitCapInt &toAdd, bitLenInt start, bitLenInt length, bitLenInt overflowIndex)=0
Add a classical integer to the register, with sign and without carry.
Definition: qalu.cpp:40
virtual void DECSC(const bitCapInt &toSub, bitLenInt start, bitLenInt length, bitLenInt overflowIndex, bitLenInt carryIndex)
Subtract a classical integer from the register, with sign and with carry.
Definition: qalu.cpp:98
virtual void CDIV(const bitCapInt &toDiv, bitLenInt start, bitLenInt carryStart, bitLenInt length, const std::vector< bitLenInt > &controls)=0
Controlled division by power of integer.
virtual void Hash(bitLenInt start, bitLenInt length, const unsigned char *values)=0
Transform a length of qubit register via lookup through a hash table.
virtual void POWModNOut(const bitCapInt &base, const bitCapInt &modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length)=0
Raise a classical base to a quantum power, modulo N, (out of place)
virtual void CPhaseFlipIfLess(const bitCapInt &greaterPerm, bitLenInt start, bitLenInt length, bitLenInt flagIndex)=0
The 6502 uses its carry flag also as a greater-than/less-than flag, for the CMP operation.
virtual void INCBCD(const bitCapInt &toAdd, bitLenInt start, bitLenInt length)=0
Add classical BCD integer (without sign)
virtual void INCBCDC(const bitCapInt &toAdd, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
Add classical BCD integer (without sign, with carry)
Definition: qalu.cpp:157
virtual void INCDECSC(const bitCapInt &toMod, bitLenInt start, bitLenInt length, bitLenInt overflowIndex, bitLenInt carryIndex)=0
Common driver method behind INCSC and DECSC (with overflow flag)
virtual bitCapInt IndexedADC(bitLenInt indexStart, bitLenInt indexLength, bitLenInt valueStart, bitLenInt valueLength, bitLenInt carryIndex, const unsigned char *values)=0
Add to entangled 8 bit register state with a superposed index-offset-based read from classical memory...
virtual void DECBCD(const bitCapInt &toSub, bitLenInt start, bitLenInt length)
Subtract classical BCD integer (without sign)
Definition: qalu.cpp:150
virtual void INCDECC(const bitCapInt &toMod, bitLenInt start, bitLenInt length, bitLenInt carryIndex)=0
Common driver method behind INCC and DECC (without sign, with carry)
virtual void MULModNOut(const bitCapInt &toMul, const bitCapInt &modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length)=0
Multiplication modulo N by integer, (out of place)
virtual void INCSC(const bitCapInt &toAdd, bitLenInt start, bitLenInt length, bitLenInt overflowIndex, bitLenInt carryIndex)
Add a classical integer to the register, with sign and with carry.
Definition: qalu.cpp:81
virtual void DECBCDC(const bitCapInt &toSub, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
Subtract BCD integer (without sign, with carry)
Definition: qalu.cpp:169
virtual void DEC(const bitCapInt &toSub, bitLenInt start, bitLenInt length)=0
Add integer (without sign)
Definition: qalu.cpp:22
virtual void MUL(const bitCapInt &toMul, bitLenInt start, bitLenInt carryStart, bitLenInt length)=0
Multiply by integer.
virtual void CPOWModNOut(const bitCapInt &base, const bitCapInt &modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length, const std::vector< bitLenInt > &controls)=0
Controlled, raise a classical base to a quantum power, modulo N, (out of place)
virtual void CMUL(const bitCapInt &toMul, bitLenInt start, bitLenInt carryStart, bitLenInt length, const std::vector< bitLenInt > &controls)=0
Controlled multiplication by integer.
virtual void INC(const bitCapInt &toAdd, bitLenInt start, bitLenInt length)=0
Add integer (without sign)
virtual void DIV(const bitCapInt &toDiv, bitLenInt start, bitLenInt carryStart, bitLenInt length)=0
Divide by integer.
virtual void CMULModNOut(const bitCapInt &toMul, const bitCapInt &modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length, const std::vector< bitLenInt > &controls)=0
Controlled multiplication modulo N by integer, (out of place)
virtual void PhaseFlipIfLess(const bitCapInt &greaterPerm, bitLenInt start, bitLenInt length)=0
This is an expedient for an adaptive Grover's search for a function's global minimum.
virtual void CIMULModNOut(const bitCapInt &toMul, const bitCapInt &modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length, const std::vector< bitLenInt > &controls)=0
Inverse of controlled multiplication modulo N by integer, (out of place)
virtual void CDEC(const bitCapInt &toSub, bitLenInt start, bitLenInt length, const std::vector< bitLenInt > &controls)
Subtract integer (without sign, with controls)
Definition: qalu.cpp:29
virtual void DECC(const bitCapInt &toSub, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
Subtract classical integer (without sign, with carry)
Definition: qalu.cpp:62
GLOSSARY: bitLenInt - "bit-length integer" - unsigned integer ID of qubit position in register bitCap...
Definition: complex16x2simd.hpp:25
std::shared_ptr< QAlu > QAluPtr
Definition: qalu.hpp:19
#define bitLenInt
Definition: qrack_types.hpp:38
#define bitCapInt
Definition: qrack_types.hpp:62