Qrack  7.0
General classical-emulating-quantum development framework
Public Member Functions | List of all members
Qrack::QAlu Class Referenceabstract

#include <qalu.hpp>

Inheritance diagram for Qrack::QAlu:
Inheritance graph
[legend]

Public Member Functions

virtual bool M (bitLenInt qubitIndex)=0
 
virtual void X (bitLenInt qubitIndex)=0
 
virtual void PhaseFlipIfLess (bitCapInt greaterPerm, bitLenInt start, bitLenInt length)=0
 This is an expedient for an adaptive Grover's search for a function's global minimum. More...
 
virtual void CPhaseFlipIfLess (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. More...
 
virtual void INC (bitCapInt toAdd, bitLenInt start, bitLenInt length)=0
 Add integer (without sign) More...
 
virtual void DEC (bitCapInt toSub, bitLenInt start, bitLenInt length)=0
 Add integer (without sign) More...
 
virtual void CINC (bitCapInt toAdd, bitLenInt start, bitLenInt length, const bitLenInt *controls, bitLenInt controlLen)=0
 Add integer (without sign, with controls) More...
 
virtual void CDEC (bitCapInt toSub, bitLenInt start, bitLenInt length, const bitLenInt *controls, bitLenInt controlLen)
 Subtract integer (without sign, with controls) More...
 
virtual void INCC (bitCapInt toAdd, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
 Add integer (without sign, with carry) More...
 
virtual void DECC (bitCapInt toSub, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
 Subtract classical integer (without sign, with carry) More...
 
virtual void INCDECC (bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt carryIndex)=0
 Common driver method behind INCC and DECC (without sign, with carry) More...
 
virtual void INCS (bitCapInt toAdd, bitLenInt start, bitLenInt length, bitLenInt overflowIndex)=0
 Add a classical integer to the register, with sign and without carry. More...
 
virtual void DECS (bitCapInt toAdd, bitLenInt start, bitLenInt length, bitLenInt overflowIndex)=0
 Add a classical integer to the register, with sign and without carry. More...
 
virtual void INCSC (bitCapInt toAdd, bitLenInt start, bitLenInt length, bitLenInt overflowIndex, bitLenInt carryIndex)
 Add a classical integer to the register, with sign and with carry. More...
 
virtual void INCSC (bitCapInt toAdd, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
 Add a classical integer to the register, with sign and with (phase-based) carry. More...
 
virtual void DECSC (bitCapInt toSub, bitLenInt start, bitLenInt length, bitLenInt overflowIndex, bitLenInt carryIndex)
 Subtract a classical integer from the register, with sign and with carry. More...
 
virtual void DECSC (bitCapInt toSub, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
 Subtract a classical integer from the register, with sign and with carry. More...
 
virtual void INCDECSC (bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt carryIndex)=0
 Common driver method behind INCSC and DECSC (without overflow flag) More...
 
virtual void INCDECSC (bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt overflowIndex, bitLenInt carryIndex)=0
 Common driver method behind INCSC and DECSC (with overflow flag) More...
 
virtual void MUL (bitCapInt toMul, bitLenInt start, bitLenInt carryStart, bitLenInt length)=0
 Multiply by integer. More...
 
virtual void DIV (bitCapInt toDiv, bitLenInt start, bitLenInt carryStart, bitLenInt length)=0
 Divide by integer. More...
 
virtual void MULModNOut (bitCapInt toMul, bitCapInt modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length)=0
 Multiplication modulo N by integer, (out of place) More...
 
virtual void IMULModNOut (bitCapInt toMul, bitCapInt modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length)=0
 Inverse of multiplication modulo N by integer, (out of place) More...
 
virtual void POWModNOut (bitCapInt base, bitCapInt modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length)=0
 Raise a classical base to a quantum power, modulo N, (out of place) More...
 
virtual void CMUL (bitCapInt toMul, bitLenInt start, bitLenInt carryStart, bitLenInt length, const bitLenInt *controls, bitLenInt controlLen)=0
 Controlled multiplication by integer. More...
 
virtual void CDIV (bitCapInt toDiv, bitLenInt start, bitLenInt carryStart, bitLenInt length, const bitLenInt *controls, bitLenInt controlLen)=0
 Controlled division by power of integer. More...
 
virtual void CMULModNOut (bitCapInt toMul, bitCapInt modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length, const bitLenInt *controls, bitLenInt controlLen)=0
 Controlled multiplication modulo N by integer, (out of place) More...
 
virtual void CIMULModNOut (bitCapInt toMul, bitCapInt modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length, const bitLenInt *controls, bitLenInt controlLen)=0
 Inverse of controlled multiplication modulo N by integer, (out of place) More...
 
virtual void CPOWModNOut (bitCapInt base, bitCapInt modN, bitLenInt inStart, bitLenInt outStart, bitLenInt length, const bitLenInt *controls, bitLenInt controlLen)=0
 Controlled, raise a classical base to a quantum power, modulo N, (out of place) More...
 
virtual void INCBCD (bitCapInt toAdd, bitLenInt start, bitLenInt length)=0
 Add classical BCD integer (without sign) More...
 
virtual void DECBCD (bitCapInt toSub, bitLenInt start, bitLenInt length)
 Subtract classical BCD integer (without sign) More...
 
virtual void INCDECBCDC (bitCapInt toMod, bitLenInt start, bitLenInt length, bitLenInt carryIndex)=0
 Common driver method behind INCSC and DECSC (without overflow flag) More...
 
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. More...
 
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. More...
 
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 classical memory. More...
 
virtual void Hash (bitLenInt start, bitLenInt length, const unsigned char *values)=0
 Transform a length of qubit register via lookup through a hash table. More...
 
virtual void INCBCDC (bitCapInt toAdd, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
 Add classical BCD integer (without sign, with carry) More...
 
virtual void DECBCDC (bitCapInt toSub, bitLenInt start, bitLenInt length, bitLenInt carryIndex)
 Subtract BCD integer (without sign, with carry) More...
 

Member Function Documentation

◆ M()

virtual bool Qrack::QAlu::M ( bitLenInt  qubitIndex)
pure virtual

◆ X()

virtual void Qrack::QAlu::X ( bitLenInt  qubitIndex)
pure virtual

The documentation for this class was generated from the following files: