class QPanda::Exp

Overview

Saves the expression containing the variable. More…

#include <QASMToQProg.h>

class Exp
{
public:
    // enums

    enum ContentType;

    // structs

    struct Content;

    // construction

    Exp(std::string name);

    Exp(
        std::shared_ptr<Exp> left_exp_ptr,
        std::shared_ptr<Exp> right_exp_ptr,
        std::string op
        );

    Exp(double val);

    // methods

    std::shared_ptr<Exp> clone();
    void set_formal_actual_var_map(std::map<std::string, double> name_val_map);
    double eval();
};

Detailed Documentation

Saves the expression containing the variable.

Methods

std::shared_ptr<Exp> clone()

clone Exp class

Returns:

std::shared_ptr<Exp> Exp class shared ptr

double eval()

evaluation

Returns:

double operation rusult