XACC
|
#include <OpenQasmVisitor.hpp>
Public Member Functions | |
virtual const std::string | name () const |
virtual const std::string | description () const |
OpenQasmVisitor (const int nQubits, bool skipPreamble=false) | |
virtual const std::string | toString () |
void | visit (Hadamard &h) |
void | visit (Identity &i) |
void | visit (CZ &cz) |
void | visit (CNOT &cn) |
void | visit (X &x) |
void | visit (Y &y) |
void | visit (Z &z) |
void | visit (U &u) |
void | visit (Measure &m) |
void | visit (Rx &rx) |
void | visit (Ry &ry) |
void | visit (Rz &rz) |
void | visit (CPhase &cp) |
void | visit (Swap &s) |
std::string | getOpenQasmString () |
std::string | getOperationsJsonString () |
std::string | getClassicalAddresses () |
int | getNumberOfAddresses () |
virtual | ~OpenQasmVisitor () |
Public Member Functions inherited from xacc::quantum::AllGateVisitor | |
void | visit (Hadamard &h) override |
void | visit (CNOT &h) override |
void | visit (Rz &h) override |
void | visit (Ry &h) override |
void | visit (Rx &h) override |
void | visit (U1 &u1) override |
void | visit (X &h) override |
void | visit (Y &h) override |
void | visit (Z &h) override |
void | visit (CY &cy) override |
void | visit (CZ &cz) override |
void | visit (Swap &s) override |
void | visit (fSim &fsim) override |
void | visit (iSwap &isw) override |
void | visit (CRZ &crz) override |
void | visit (CH &ch) override |
void | visit (S &s) override |
void | visit (Sdg &sdg) override |
void | visit (T &t) override |
void | visit (Tdg &tdg) override |
void | visit (IfStmt &tdg) override |
Public Member Functions inherited from xacc::BaseInstructionVisitor | |
~BaseInstructionVisitor () override | |
virtual std::string & | getNativeAssembly () |
void | resetNativeAssembly () |
Public Member Functions inherited from xacc::Identifiable | |
virtual | ~Identifiable () |
Public Member Functions inherited from xacc::InstructionVisitor< Hadamard > | |
virtual void | visit (Hadamard &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< CNOT > | |
virtual void | visit (CNOT &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Rz > | |
virtual void | visit (Rz &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Rx > | |
virtual void | visit (Rx &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Ry > | |
virtual void | visit (Ry &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< X > | |
virtual void | visit (X &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Y > | |
virtual void | visit (Y &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Z > | |
virtual void | visit (Z &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< CPhase > | |
virtual void | visit (CPhase &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Swap > | |
virtual void | visit (Swap &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< iSwap > | |
virtual void | visit (iSwap &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< fSim > | |
virtual void | visit (fSim &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Measure > | |
virtual void | visit (Measure &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Identity > | |
virtual void | visit (Identity &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< CZ > | |
virtual void | visit (CZ &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< CY > | |
virtual void | visit (CY &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< CRZ > | |
virtual void | visit (CRZ &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< CH > | |
virtual void | visit (CH &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< S > | |
virtual void | visit (S &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Sdg > | |
virtual void | visit (Sdg &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< T > | |
virtual void | visit (T &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< Tdg > | |
virtual void | visit (Tdg &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< U > | |
virtual void | visit (U &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< U1 > | |
virtual void | visit (U1 &)=0 |
virtual | ~InstructionVisitor () |
Public Member Functions inherited from xacc::InstructionVisitor< IfStmt > | |
virtual void | visit (IfStmt &)=0 |
virtual | ~InstructionVisitor () |
Public Attributes | |
bool | isIBMAcc = false |
int | classicalBitCounter = 0 |
Protected Attributes | |
double | pi = xacc::constants::pi |
std::string | classicalAddresses |
std::map< int, int > | qubitToClassicalBitIndex |
int | numAddresses = 0 |
int | _nQubits |
std::string | operationsJsonStr = "[" |
Protected Attributes inherited from xacc::BaseInstructionVisitor | |
std::string | native = "" |
The OpenQasmVisitor is an InstructionVisitor that visits quantum gate instructions and creates an equivalent OpenQasm string that can be executed by the Rigetti superconducting quantum computer.
|
inlinevirtual |
The destructor
|
inlinevirtual |
Return the description of this instance
Reimplemented from xacc::BaseInstructionVisitor.
|
inline |
Return the classical measurement indices as a json int array represented as a string.
|
inline |
Return the OpenQasm string
|
inlinevirtual |
Return the name of this instance.
Reimplemented from xacc::BaseInstructionVisitor.
|
inline |
Visit hadamard gates
|
inline |
Visit Measurement gates
|
protected |
Reference to the classical memory address indices where measurements are recorded.