Qrack  7.0
General classical-emulating-quantum development framework
Functions
Logic Gates

Each bit is paired with a CL* variant that utilizes a classical bit as an input. More...

Functions

virtual void Qrack::QInterface::AND (bitLenInt inputBit1, bitLenInt inputBit2, bitLenInt outputBit)
 Quantum analog of classical "AND" gate. More...
 
virtual void Qrack::QInterface::OR (bitLenInt inputBit1, bitLenInt inputBit2, bitLenInt outputBit)
 Quantum analog of classical "OR" gate. More...
 
virtual void Qrack::QInterface::XOR (bitLenInt inputBit1, bitLenInt inputBit2, bitLenInt outputBit)
 Quantum analog of classical "XOR" gate. More...
 
virtual void Qrack::QInterface::CLAND (bitLenInt inputQBit, bool inputClassicalBit, bitLenInt outputBit)
 Quantum analog of classical "AND" gate. More...
 
virtual void Qrack::QInterface::CLOR (bitLenInt inputQBit, bool inputClassicalBit, bitLenInt outputBit)
 Quantum analog of classical "OR" gate. More...
 
virtual void Qrack::QInterface::CLXOR (bitLenInt inputQBit, bool inputClassicalBit, bitLenInt outputBit)
 Quantum analog of classical "XOR" gate. More...
 
virtual void Qrack::QInterface::NAND (bitLenInt inputBit1, bitLenInt inputBit2, bitLenInt outputBit)
 Quantum analog of classical "NAND" gate. More...
 
virtual void Qrack::QInterface::NOR (bitLenInt inputBit1, bitLenInt inputBit2, bitLenInt outputBit)
 Quantum analog of classical "NOR" gate. More...
 
virtual void Qrack::QInterface::XNOR (bitLenInt inputBit1, bitLenInt inputBit2, bitLenInt outputBit)
 Quantum analog of classical "XNOR" gate. More...
 
virtual void Qrack::QInterface::CLNAND (bitLenInt inputQBit, bool inputClassicalBit, bitLenInt outputBit)
 Quantum analog of classical "NAND" gate. More...
 
virtual void Qrack::QInterface::CLNOR (bitLenInt inputQBit, bool inputClassicalBit, bitLenInt outputBit)
 Quantum analog of classical "NOR" gate. More...
 
virtual void Qrack::QInterface::CLXNOR (bitLenInt inputQBit, bool inputClassicalBit, bitLenInt outputBit)
 Quantum analog of classical "XNOR" gate. More...
 

Detailed Description

Each bit is paired with a CL* variant that utilizes a classical bit as an input.

Function Documentation

◆ AND()

void Qrack::QInterface::AND ( bitLenInt  inputBit1,
bitLenInt  inputBit2,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "AND" gate.

(Assumes the outputBit is in the 0 state)

◆ CLAND()

void Qrack::QInterface::CLAND ( bitLenInt  inputQBit,
bool  inputClassicalBit,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "AND" gate.

Takes one qubit input and one classical bit input. (Assumes the outputBit is in the 0 state)

◆ CLNAND()

void Qrack::QInterface::CLNAND ( bitLenInt  inputQBit,
bool  inputClassicalBit,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "NAND" gate.

Takes one qubit input and one classical bit input. (Assumes the outputBit is in the 0 state)

◆ CLNOR()

void Qrack::QInterface::CLNOR ( bitLenInt  inputQBit,
bool  inputClassicalBit,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "NOR" gate.

Takes one qubit input and one classical bit input. (Assumes the outputBit is in the 0 state)

◆ CLOR()

void Qrack::QInterface::CLOR ( bitLenInt  inputQBit,
bool  inputClassicalBit,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "OR" gate.

Takes one qubit input and one classical bit input. (Assumes the outputBit is in the 0 state)

◆ CLXNOR()

void Qrack::QInterface::CLXNOR ( bitLenInt  inputQBit,
bool  inputClassicalBit,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "XNOR" gate.

Takes one qubit input and one classical bit input. (Assumes the outputBit is in the 0 state)

◆ CLXOR()

void Qrack::QInterface::CLXOR ( bitLenInt  inputQBit,
bool  inputClassicalBit,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "XOR" gate.

Takes one qubit input and one classical bit input. (Assumes the outputBit is in the 0 state)

◆ NAND()

void Qrack::QInterface::NAND ( bitLenInt  inputBit1,
bitLenInt  inputBit2,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "NAND" gate.

(Assumes the outputBit is in the 0 state)

◆ NOR()

void Qrack::QInterface::NOR ( bitLenInt  inputBit1,
bitLenInt  inputBit2,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "NOR" gate.

(Assumes the outputBit is in the 0 state)

◆ OR()

void Qrack::QInterface::OR ( bitLenInt  inputBit1,
bitLenInt  inputBit2,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "OR" gate.

(Assumes the outputBit is in the 0 state)

◆ XNOR()

void Qrack::QInterface::XNOR ( bitLenInt  inputBit1,
bitLenInt  inputBit2,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "XNOR" gate.

(Assumes the outputBit is in the 0 state)

◆ XOR()

void Qrack::QInterface::XOR ( bitLenInt  inputBit1,
bitLenInt  inputBit2,
bitLenInt  outputBit 
)
virtual

Quantum analog of classical "XOR" gate.

(Assumes the outputBit is in the 0 state)