Maestro 0.3.1
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 &gateName) 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 const std::unordered_set< std::string > & AllowedMultipleParamsGates ()
static const std::unordered_set< std::string > & AllowedNoParamGates ()
static const std::unordered_set< std::string > & AllowedOneParamGates ()
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 34 of file SyntaxTree.h.


Class Documentation

◆ qasm::AddGateExpr::result

struct qasm::AddGateExpr::result

Definition at line 35 of file SyntaxTree.h.

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

Member Function Documentation

◆ AllowedMultipleParamsGates()

const std::unordered_set< std::string > & qasm::AddGateExpr::AllowedMultipleParamsGates ( )
inlinestatic

Definition at line 517 of file SyntaxTree.h.

◆ AllowedNoParamGates()

const std::unordered_set< std::string > & qasm::AddGateExpr::AllowedNoParamGates ( )
inlinestatic

Definition at line 509 of file SyntaxTree.h.

◆ AllowedOneParamGates()

const std::unordered_set< std::string > & qasm::AddGateExpr::AllowedOneParamGates ( )
inlinestatic

Definition at line 513 of file SyntaxTree.h.

◆ 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()

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

◆ GetGateType()

◆ IsSuppportedGate()

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

Definition at line 405 of file SyntaxTree.h.

◆ IsSuppportedMultipleParamsGate()

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

Definition at line 400 of file SyntaxTree.h.

◆ IsSuppportedNoParamGate()

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

Definition at line 392 of file SyntaxTree.h.

◆ IsSuppportedOneParamGate()

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

Definition at line 396 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 39 of file SyntaxTree.h.

◆ ParseQubits()

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

Definition at line 386 of file SyntaxTree.h.

References qasm::ResolveRegisterOperand().


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