class QPanda::NodeInfo

Overview

Detailed information of a QProg node. More…

#include <QCircuitInfo.h>

class NodeInfo
{
public:
    // fields

    NodeIter m_iter;
    NodeType m_node_type;
    GateType m_gate_type;
    bool m_is_dagger;
    QVec m_target_qubits;
    QVec m_control_qubits;
    std::vector<int> m_cbits;
    std::vector<double> m_params;
    std::string m_name;

    // construction

    NodeInfo();

    NodeInfo(
        const NodeIter iter,
        QVec target_qubits,
        QVec control_qubits,
        int type,
        const bool dagger
        );

    // methods

    virtual void reset();
};

// direct descendants

struct OptimizerNodeInfo;

Detailed Documentation

Detailed information of a QProg node.

Fields

NodeIter m_iter

the NodeIter of the node

NodeType m_node_type

the node type

GateType m_gate_type

the gate type (if the node type is gate_node)

bool m_is_dagger

dagger information

QVec m_target_qubits

Quantum bits of current node.

QVec m_control_qubits

control Quantum bits.

Construction

NodeInfo()

Constructor of NodeInfo.

Methods

virtual void reset()

reset the node information