Qrack  10.0
General classical-emulating-quantum development framework
Namespaces | Functions
functions.cpp File Reference
#include "qrack_functions.hpp"
#include <algorithm>
Include dependency graph for functions.cpp:

Namespaces

 Qrack
 GLOSSARY: bitLenInt - "bit-length integer" - unsigned integer ID of qubit position in register bitCapInt - "bit-capacity integer" - unsigned integer single-permutation value of a qubit register (typically "big integer") real1 - "real number (1-dimensional)" - floating-point real-valued number complex - "complex number" - floating-point complex-valued number (with two real1 component dimensions) quid - "quantum (simulator) unique identifier" - unsigned integer that indexes and IDs running simulators, circuits, and neurons.
 

Functions

unsigned char * Qrack::cl_alloc (size_t ucharCount)
 
void Qrack::cl_free (void *toFree)
 
bitCapInt Qrack::intPow (const bitCapInt &base, const bitCapInt &power)
 
bitCapIntOcl Qrack::intPowOcl (bitCapIntOcl base, bitCapIntOcl power)
 
void Qrack::mul2x2 (const complex *left, const complex *right, complex *out)
 
void Qrack::_expLog2x2 (const complex *matrix2x2, complex *outMatrix2x2, bool isExp)
 
void Qrack::exp2x2 (const complex *matrix2x2, complex *outMatrix2x2)
 
void Qrack::log2x2 (const complex *matrix2x2, complex *outMatrix2x2)
 
void Qrack::inv2x2 (const complex *matrix2x2, complex *outMatrix2x2)
 
bool Qrack::isOverflowAdd (bitCapIntOcl inOutInt, bitCapIntOcl inInt, const bitCapIntOcl &signMask, const bitCapIntOcl &lengthPower)
 Check if an addition with overflow sets the flag. More...
 
bool Qrack::isOverflowSub (bitCapIntOcl inOutInt, bitCapIntOcl inInt, const bitCapIntOcl &signMask, const bitCapIntOcl &lengthPower)
 Check if a subtraction with overflow sets the flag. More...
 
bitCapInt Qrack::pushApartBits (const bitCapInt &perm, const std::vector< bitCapInt > &skipPowers)