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

#include <SyntaxTree.h>

Inheritance diagram for qasm::AddModifiedGateExpr:
Collaboration diagram for qasm::AddModifiedGateExpr:

Classes

struct  result

Public Member Functions

virtual double Eval () const
virtual double Eval (const std::unordered_map< std::string, double > &variables) const
QoperationStatement operator() (const ModifiedUopType &modifiedUop, 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 void ApplyCtrl (std::string &gateName, std::vector< double > &params)
static void ApplyInv (std::string &gateName, std::vector< double > &params)
static void ApplyPow (double exponent, std::string &gateName, std::vector< double > &params, int &repetitions)
static void Canonicalize (const UopType &uop, std::string &gateName, std::vector< double > &params, MixedListType &args, const std::unordered_map< std::string, double > &variables)
static QoperationStatement ConjugateNegatedControls (const QoperationStatement &gate, const std::string &gateName, const std::vector< double > &params, const std::vector< size_t > &negatedControls)
static bool IsControl (const ModifierType &modifier)
static UopType MakeCall (const std::string &gateName, const std::vector< double > &params, const MixedListType &args)
static std::vector< size_t > NegatedControls (const ModifierListType &modifiers)
static QoperationStatement NoOpStatement ()
static void NormalizeGateName (std::string &gateName)

Detailed Description

Definition at line 551 of file SyntaxTree.h.


Class Documentation

◆ qasm::AddModifiedGateExpr::result

struct qasm::AddModifiedGateExpr::result

Definition at line 552 of file SyntaxTree.h.

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

Member Function Documentation

◆ ApplyCtrl()

void qasm::AddModifiedGateExpr::ApplyCtrl ( std::string & gateName,
std::vector< double > & params )
inlinestatic

Definition at line 881 of file SyntaxTree.h.

◆ ApplyInv()

void qasm::AddModifiedGateExpr::ApplyInv ( std::string & gateName,
std::vector< double > & params )
inlinestatic

Definition at line 800 of file SyntaxTree.h.

Referenced by ApplyPow().

◆ ApplyPow()

void qasm::AddModifiedGateExpr::ApplyPow ( double exponent,
std::string & gateName,
std::vector< double > & params,
int & repetitions )
inlinestatic

Definition at line 835 of file SyntaxTree.h.

References ApplyInv().

◆ Canonicalize()

void qasm::AddModifiedGateExpr::Canonicalize ( const UopType & uop,
std::string & gateName,
std::vector< double > & params,
MixedListType & args,
const std::unordered_map< std::string, double > & variables )
inlinestatic

Definition at line 729 of file SyntaxTree.h.

References qasm::EvaluateGateParameter().

◆ ConjugateNegatedControls()

QoperationStatement qasm::AddModifiedGateExpr::ConjugateNegatedControls ( const QoperationStatement & gate,
const std::string & gateName,
const std::vector< double > & params,
const std::vector< size_t > & negatedControls )
inlinestatic

◆ 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

◆ IsControl()

bool qasm::AddModifiedGateExpr::IsControl ( const ModifierType & modifier)
inlinestatic

Definition at line 925 of file SyntaxTree.h.

References qasm::Ctrl, qasm::ModifierType::kind, and qasm::NegCtrl.

Referenced by NegatedControls().

◆ MakeCall()

UopType qasm::AddModifiedGateExpr::MakeCall ( const std::string & gateName,
const std::vector< double > & params,
const MixedListType & args )
inlinestatic

Definition at line 779 of file SyntaxTree.h.

Referenced by ConjugateNegatedControls().

◆ NegatedControls()

std::vector< size_t > qasm::AddModifiedGateExpr::NegatedControls ( const ModifierListType & modifiers)
inlinestatic

Definition at line 664 of file SyntaxTree.h.

References IsControl(), and qasm::NegCtrl.

◆ NoOpStatement()

QoperationStatement qasm::AddModifiedGateExpr::NoOpStatement ( )
inlinestatic

◆ NormalizeGateName()

void qasm::AddModifiedGateExpr::NormalizeGateName ( std::string & gateName)
inlinestatic

Definition at line 766 of file SyntaxTree.h.

◆ operator()()

QoperationStatement qasm::AddModifiedGateExpr::operator() ( const ModifiedUopType & modifiedUop,
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 556 of file SyntaxTree.h.


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