struct QPanda::QScheduler::LogicalGate

Overview

logical gate More…

#include <QScheduler.h>

struct LogicalGate
{
    // fields

    int t;
    int c;
    std::string gate;
    int gate_type;
    bool is_dagger;
    std::vector<double> param;
    int barrier_id;

    // construction

    LogicalGate(
        std::string gate,
        int gate_type,
        int c,
        int t,
        std::vector<double> param,
        int barrier_id,
        bool is_dagger
        );

    // methods

    bool isSingleQubitGate() const;
};

Detailed Documentation

logical gate

Fields

int t

index of the target qubit

int c

index of the control qubit, c = -1 for single qubit gate

std::string gate

type of the gate

int gate_type

these parameters can be encapsulated

Construction

LogicalGate(
    std::string gate,
    int gate_type,
    int c,
    int t,
    std::vector<double> param,
    int barrier_id,
    bool is_dagger
    )

create a gate