struct QPanda::Variational::impl

Overview

implementation class for the var. Impl only includes classical operator with fixed number of arguments. More…

#include <var.h>

struct impl
{
    // fields

    MatrixXd val;
    bool m_is_differentiable;
    op_type op;
    std::vector<var> children;
    std::vector<std::weak_ptr<impl>> parents;
    MatrixXd m_prob;

    // construction

    impl(const MatrixXd&);

    impl(
        const MatrixXd&,
        bool isDifferentiable
        );

    impl(op_type, const std::vector<var>&);
};

// direct descendants

struct impl_qop_pmeasure;
struct impl_qop_pmeasure_real_chip;
struct impl_stack;
struct impl_subscript;
struct impl_vqp;
struct impl_vqp_real_chip;

Detailed Documentation

implementation class for the var. Impl only includes classical operator with fixed number of arguments.

Fields

MatrixXd val

Internal value.

bool m_is_differentiable

Placeholder/Variable.

op_type op

Operator type.

std::vector<var> children

Childrens. For example, c = a + b. c is a and b’s parent, a and b are c’s children.

std::vector<std::weak_ptr<impl>> parents

Parents. For example, c = a + b. c is a and b’s parent, a and b are c’s children.

MatrixXd m_prob

Internal value.

Construction

impl(const MatrixXd&)

Construct from a Eigen matrix.

impl(op_type, const std::vector<var>&)

Construct from a operator.