.. index:: pair: struct; QPanda::QScheduler::LogicalGate .. _doxid-struct_q_panda_1_1_q_scheduler_1_1_logical_gate: struct QPanda::QScheduler::LogicalGate ====================================== .. toctree:: :hidden: Overview ~~~~~~~~ logical gate :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct LogicalGate { // fields int :ref:`t`; int :ref:`c`; std::string :ref:`gate`; int :ref:`gate_type`; bool :target:`is_dagger`; std::vector :target:`param`; int :target:`barrier_id`; // construction :ref:`LogicalGate`( std::string gate, int gate_type, int c, int t, std::vector param, int barrier_id, bool is_dagger ); // methods bool :target:`isSingleQubitGate`() const; }; .. _details-struct_q_panda_1_1_q_scheduler_1_1_logical_gate: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ logical gate Fields ------ .. index:: pair: variable; t .. _doxid-struct_q_panda_1_1_q_scheduler_1_1_logical_gate_1a944c20a5975deef8ac2b52f95becbaa8: .. ref-code-block:: cpp :class: doxyrest-title-code-block int t index of the target qubit .. index:: pair: variable; c .. _doxid-struct_q_panda_1_1_q_scheduler_1_1_logical_gate_1aa20140a3fe4cadb09f4eb2f1ebdeb7aa: .. ref-code-block:: cpp :class: doxyrest-title-code-block int c index of the control qubit, c = -1 for single qubit gate .. index:: pair: variable; gate .. _doxid-struct_q_panda_1_1_q_scheduler_1_1_logical_gate_1afe8cfb0b223a262490027cb6b2893513: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::string gate type of the gate .. index:: pair: variable; gate_type .. _doxid-struct_q_panda_1_1_q_scheduler_1_1_logical_gate_1af8d83dcc88845d1312daba612b1ce7f6: .. ref-code-block:: cpp :class: doxyrest-title-code-block int gate_type these parameters can be encapsulated Construction ------------ .. index:: pair: function; LogicalGate .. _doxid-struct_q_panda_1_1_q_scheduler_1_1_logical_gate_1aa0bb52912685b6a3d0d63e88753e6c09: .. ref-code-block:: cpp :class: doxyrest-title-code-block LogicalGate( std::string gate, int gate_type, int c, int t, std::vector param, int barrier_id, bool is_dagger ) create a gate