Qrack  1.7
General classical-emulating-quantum development framework
Functions
Utility functions

Functions

virtual complexQrack::QEngineCPU::GetState ()
 
virtual void Qrack::QEngineCPU::CopyState (QInterfacePtr orig)
 Direct copy of raw state vector to produce a clone. More...
 
virtual real1 Qrack::QEngineCPU::Prob (bitLenInt qubitIndex)
 PSEUDO-QUANTUM Direct measure of bit probability to be in |1> state. More...
 
virtual real1 Qrack::QEngineCPU::ProbAll (bitCapInt fullRegister)
 PSEUDO-QUANTUM Direct measure of full register probability to be in permutation state. More...
 
virtual void Qrack::QEngineCPU::SetBit (bitLenInt qubitIndex1, bool value)
 Set individual bit to pure |0> (false) or |1> (true) state. More...
 
virtual real1 Qrack::QEngineCPU::GetNorm (bool update=true)
 
virtual void Qrack::QEngineCPU::SetNorm (real1 n)
 
virtual void Qrack::QEngineCPU::NormalizeState (real1 nrm=-999.0)
 
virtual bool Qrack::QEngineCPU::ForceM (bitLenInt qubitIndex, bool result, bool doForce=true, real1 nrmlzr=1.0)
 PSEUDO-QUANTUM - Acts like a measurement gate, except with a specified forced result. More...
 
virtual void Qrack::QInterface::CopyState (QInterfacePtr orig)=0
 Direct copy of raw state vector to produce a clone. More...
 
virtual real1 Qrack::QInterface::Prob (bitLenInt qubitIndex)=0
 Direct measure of bit probability to be in |1> state. More...
 
virtual real1 Qrack::QInterface::ProbAll (bitCapInt fullRegister)=0
 Direct measure of full register probability to be in permutation state. More...
 
virtual void Qrack::QInterface::SetBit (bitLenInt qubitIndex1, bool value)
 Set individual bit to pure |0> (false) or |1> (true) state. More...
 
virtual void Qrack::QUnit::CopyState (QUnitPtr orig)
 
virtual void Qrack::QUnit::CopyState (QInterfacePtr orig)
 Direct copy of raw state vector to produce a clone. More...
 
virtual real1 Qrack::QUnit::Prob (bitLenInt qubit)
 Direct measure of bit probability to be in |1> state. More...
 
virtual real1 Qrack::QUnit::ProbAll (bitCapInt fullRegister)
 Direct measure of full register probability to be in permutation state. More...
 
virtual void Qrack::QUnit::SetBit (bitLenInt qubit1, bool value)
 Set individual bit to pure |0> (false) or |1> (true) state. More...
 

Detailed Description

Function Documentation

void Qrack::QUnit::CopyState ( QUnitPtr  orig)
virtual
void Qrack::QUnit::CopyState ( QInterfacePtr  orig)
virtual

Direct copy of raw state vector to produce a clone.

Warning
PSEUDO-QUANTUM

Implements Qrack::QInterface.

void Qrack::QEngineCPU::CopyState ( QInterfacePtr  orig)
virtual

Direct copy of raw state vector to produce a clone.

Warning
PSEUDO-QUANTUM

Implements Qrack::QInterface.

virtual void Qrack::QInterface::CopyState ( QInterfacePtr  orig)
pure virtual

Direct copy of raw state vector to produce a clone.

Warning
PSEUDO-QUANTUM

Implemented in Qrack::QEngineCPU, Qrack::QUnit, and Qrack::QEngineOCLMulti.

bool Qrack::QEngineCPU::ForceM ( bitLenInt  qubitIndex,
bool  result,
bool  doForce = true,
real1  nrmlzr = 1.0 
)
virtual

PSEUDO-QUANTUM - Acts like a measurement gate, except with a specified forced result.

virtual real1 Qrack::QEngineCPU::GetNorm ( bool  update = true)
inlinevirtual
complex * Qrack::QEngineCPU::GetState ( )
virtual
void Qrack::QEngineCPU::NormalizeState ( real1  nrm = -999.0)
virtual

Reimplemented in Qrack::QEngineOCL.

real1 Qrack::QUnit::Prob ( bitLenInt  qubitIndex)
virtual

Direct measure of bit probability to be in |1> state.

Warning
PSEUDO-QUANTUM

Implements Qrack::QInterface.

real1 Qrack::QEngineCPU::Prob ( bitLenInt  qubitIndex)
virtual

PSEUDO-QUANTUM Direct measure of bit probability to be in |1> state.

Implements Qrack::QInterface.

Reimplemented in Qrack::QEngineOCL.

virtual real1 Qrack::QInterface::Prob ( bitLenInt  qubitIndex)
pure virtual

Direct measure of bit probability to be in |1> state.

Warning
PSEUDO-QUANTUM

Implemented in Qrack::QEngineCPU, Qrack::QUnit, Qrack::QEngineOCLMulti, and Qrack::QEngineOCL.

real1 Qrack::QUnit::ProbAll ( bitCapInt  fullRegister)
virtual

Direct measure of full register probability to be in permutation state.

Warning
PSEUDO-QUANTUM

Implements Qrack::QInterface.

real1 Qrack::QEngineCPU::ProbAll ( bitCapInt  fullRegister)
virtual

PSEUDO-QUANTUM Direct measure of full register probability to be in permutation state.

Implements Qrack::QInterface.

virtual real1 Qrack::QInterface::ProbAll ( bitCapInt  fullRegister)
pure virtual

Direct measure of full register probability to be in permutation state.

Warning
PSEUDO-QUANTUM

Implemented in Qrack::QEngineCPU, Qrack::QUnit, and Qrack::QEngineOCLMulti.

void Qrack::QUnit::SetBit ( bitLenInt  qubitIndex1,
bool  value 
)
virtual

Set individual bit to pure |0> (false) or |1> (true) state.

To set a bit, the bit is first measured. If the result of measurement matches "value," the bit is considered set. If the result of measurement is the opposite of "value," an X gate is applied to the bit. The state ends up entirely in the "value" state, with a random phase factor.

Reimplemented from Qrack::QInterface.

void Qrack::QEngineCPU::SetBit ( bitLenInt  qubitIndex1,
bool  value 
)
virtual

Set individual bit to pure |0> (false) or |1> (true) state.

Reimplemented from Qrack::QInterface.

void Qrack::QInterface::SetBit ( bitLenInt  qubitIndex1,
bool  value 
)
virtual

Set individual bit to pure |0> (false) or |1> (true) state.

To set a bit, the bit is first measured. If the result of measurement matches "value," the bit is considered set. If the result of measurement is the opposite of "value," an X gate is applied to the bit. The state ends up entirely in the "value" state, with a random phase factor.

Reimplemented in Qrack::QEngineCPU, and Qrack::QUnit.

virtual void Qrack::QEngineCPU::SetNorm ( real1  n)
inlinevirtual