Maestro 0.3.1
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
SyntaxTree.h File Reference
#include <algorithm>
#include "../Circuit/Factory.h"
#include "SimpleOps.h"
Include dependency graph for SyntaxTree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  qasm::AddBitCondBranchExpr
struct  qasm::AddCondQopBracedExpr
struct  qasm::AddCondQopExpr
struct  qasm::AddGateExpr
struct  qasm::AddModifiedGateExpr
struct  qasm::Program
struct  qasm::RejectGateBodyModifierExpr
struct  qasm::RejectQasm3OnlyGateExpr
struct  qasm::RejectUnsupportedConstructExpr
struct  qasm::AddGateExpr::result
struct  qasm::AddModifiedGateExpr::result
struct  qasm::RejectGateBodyModifierExpr::result
struct  qasm::RejectUnsupportedConstructExpr::result
struct  qasm::RejectQasm3OnlyGateExpr::result< typename, typename >
struct  qasm::AddCondQopExpr::result
struct  qasm::AddBitCondBranchExpr::result
struct  qasm::AddCondQopBracedExpr::result

Namespaces

namespace  qasm

Macros

#define _SYNTAXTREE_H_

Functions

void qasm::ApplyCondition (StatementType &stmt, const std::vector< int > &conditionBits, const std::vector< bool > &expectedValues)
std::vector< bool > qasm::DecodeRegisterCondition (const std::string &registerName, int value, size_t width)
double qasm::EvaluateGateParameter (const Expression &parameter, const std::unordered_map< std::string, double > &variables)
template<class Time>
std::shared_ptr< Circuits::IConditionqasm::MakeEqualCondition (const std::vector< int > &conditionBits, const std::vector< bool > &expectedValues)
void qasm::RejectPredicateMutationBeforeReevaluation (const std::vector< QopType > &body, const std::vector< int > &conditionBits, bool followedByElse, std::string_view branchName)

Variables

phx::function< AddCondQopExprqasm::AddCondQop
phx::function< AddCondQopBracedExprqasm::AddCondQopBraced
phx::function< AddGateExprqasm::AddGate
phx::function< AddModifiedGateExprqasm::AddModifiedGate
phx::function< RejectGateBodyModifierExprqasm::RejectGateBodyModifier
phx::function< RejectQasm3OnlyGateExprqasm::RejectQasm3OnlyGate
phx::function< RejectUnsupportedConstructExprqasm::RejectUnsupportedConstruct

Detailed Description

Version
1.0

DESCRIPTION

Classes for the qasm parser and interpreter.

Supports the static-circuit subset of OpenQASM 2 and OpenQASM 3.

Definition in 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

◆ 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

◆ qasm::RejectGateBodyModifierExpr::result

struct qasm::RejectGateBodyModifierExpr::result

Definition at line 949 of file SyntaxTree.h.

Collaboration diagram for qasm::RejectGateBodyModifierExpr::result:
Class Members
typedef UopType type

◆ qasm::RejectUnsupportedConstructExpr::result

struct qasm::RejectUnsupportedConstructExpr::result

Definition at line 971 of file SyntaxTree.h.

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

◆ qasm::RejectQasm3OnlyGateExpr::result

struct qasm::RejectQasm3OnlyGateExpr::result
template<typename, typename>
struct qasm::RejectQasm3OnlyGateExpr::result< typename, typename >

Definition at line 1001 of file SyntaxTree.h.

Collaboration diagram for qasm::RejectQasm3OnlyGateExpr::result< typename, typename >:
Class Members
typedef bool type

◆ qasm::AddCondQopExpr::result

struct qasm::AddCondQopExpr::result

Definition at line 1082 of file SyntaxTree.h.

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

◆ qasm::AddBitCondBranchExpr::result

struct qasm::AddBitCondBranchExpr::result

Definition at line 1116 of file SyntaxTree.h.

Collaboration diagram for qasm::AddBitCondBranchExpr::result:
Class Members
typedef vector< QoperationStatement > type

◆ qasm::AddCondQopBracedExpr::result

struct qasm::AddCondQopBracedExpr::result

Definition at line 1178 of file SyntaxTree.h.

Collaboration diagram for qasm::AddCondQopBracedExpr::result:
Class Members
typedef vector< QoperationStatement > type

Macro Definition Documentation

◆ _SYNTAXTREE_H_

#define _SYNTAXTREE_H_

Definition at line 16 of file SyntaxTree.h.