Maestro 0.2.5
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
qasm::AddGateExpr Struct Reference

#include <SyntaxTree.h>

+ Inheritance diagram for qasm::AddGateExpr:
+ Collaboration diagram for qasm::AddGateExpr:

Classes

struct  result
 

Public Member Functions

virtual double Eval () const
 
virtual double Eval (const std::unordered_map< std::string, double > &variables) const
 
Circuits::QuantumGateType GetGateType (const std::string &gateN) const
 
QoperationStatement operator() (const UopType &uop, const std::unordered_map< std::string, IndexedId > &qreg_map, const std::unordered_map< std::string, StatementType > &opaqueGates, const std::unordered_map< std::string, StatementType > &definedGates, const std::unordered_map< std::string, double > &variables={}) const
 

Static Public Member Functions

static int GateNrQubits (Circuits::QuantumGateType gateType)
 
static bool IsSuppportedGate (const std::string &gateName)
 
static bool IsSuppportedMultipleParamsGate (const std::string &gateName)
 
static bool IsSuppportedNoParamGate (const std::string &gateName)
 
static bool IsSuppportedOneParamGate (const std::string &gateName)
 
static std::vector< int > ParseQubits (const ArgumentType &arg, const std::unordered_map< std::string, IndexedId > &qreg_map)
 

Detailed Description

Definition at line 22 of file SyntaxTree.h.


Class Documentation

◆ qasm::AddGateExpr::result

struct qasm::AddGateExpr::result

Definition at line 23 of file SyntaxTree.h.

+ Collaboration diagram for qasm::AddGateExpr::result:
Class Members
typedef QoperationStatement type

Member Function Documentation

◆ Eval() [1/2]

virtual double qasm::AbstractSyntaxTree::Eval ( ) const
inlinevirtualinherited

◆ Eval() [2/2]

virtual double qasm::AbstractSyntaxTree::Eval ( const std::unordered_map< std::string, double > &  variables) const
inlinevirtualinherited

◆ GateNrQubits()

static int qasm::AddGateExpr::GateNrQubits ( Circuits::QuantumGateType  gateType)
inlinestatic

◆ GetGateType()

◆ IsSuppportedGate()

static bool qasm::AddGateExpr::IsSuppportedGate ( const std::string &  gateName)
inlinestatic

Definition at line 416 of file SyntaxTree.h.

◆ IsSuppportedMultipleParamsGate()

static bool qasm::AddGateExpr::IsSuppportedMultipleParamsGate ( const std::string &  gateName)
inlinestatic

Definition at line 411 of file SyntaxTree.h.

◆ IsSuppportedNoParamGate()

static bool qasm::AddGateExpr::IsSuppportedNoParamGate ( const std::string &  gateName)
inlinestatic

Definition at line 403 of file SyntaxTree.h.

◆ IsSuppportedOneParamGate()

static bool qasm::AddGateExpr::IsSuppportedOneParamGate ( const std::string &  gateName)
inlinestatic

Definition at line 407 of file SyntaxTree.h.

◆ operator()()

QoperationStatement qasm::AddGateExpr::operator() ( const UopType uop,
const std::unordered_map< std::string, IndexedId > &  qreg_map,
const std::unordered_map< std::string, StatementType > &  opaqueGates,
const std::unordered_map< std::string, StatementType > &  definedGates,
const std::unordered_map< std::string, double > &  variables = {} 
) const
inline

Definition at line 27 of file SyntaxTree.h.

◆ ParseQubits()

static std::vector< int > qasm::AddGateExpr::ParseQubits ( const ArgumentType arg,
const std::unordered_map< std::string, IndexedId > &  qreg_map 
)
inlinestatic

Definition at line 377 of file SyntaxTree.h.

References qasm::IndexedId::id, and qasm::IndexedId::index.


The documentation for this struct was generated from the following file: