61 #define FLAG_PAULI 0x01 62 #define FLAG_CLIFFORD 0x02 64 #define FLAG_GAUSSIAN 0x04 66 #define FLAG_PARAMETRIC 0x08 79 UINT _gate_property=0;
80 std::string _name=
"Generic gate";
92 const std::vector<TargetQubitInfo>& target_qubit_list = _target_qubit_list;
93 const std::vector<ControlQubitInfo>& control_qubit_list = _control_qubit_list;
101 std::vector<UINT> res(target_qubit_list.size());
102 for (UINT i = 0; i < target_qubit_list.size(); ++i) res[i] = target_qubit_list[i].index();
111 std::vector<UINT> res(control_qubit_list.size());
112 for (UINT i = 0; i < control_qubit_list.size(); ++i) res[i] = control_qubit_list[i].index();
151 bool is_Pauli()
const;
158 bool is_Clifford()
const;
165 bool is_Gaussian()
const;
172 bool is_parametric()
const;
179 bool is_diagonal()
const;
187 UINT get_property_value()
const;
197 bool commute_Pauli_at(UINT qubit_index, UINT pauli_type)
const;
204 virtual std::string to_string()
const;
Eigen::Matrix< CPPCTYPE, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > ComplexMatrix
Definition: type.hpp:17
std::vector< TargetQubitInfo > _target_qubit_list
Definition: gate.hpp:77
std::vector< ControlQubitInfo > _control_qubit_list
Definition: gate.hpp:78
#define DllExport
Definition: type.hpp:30
Definition: gate_matrix.hpp:9
Definition: gate_factory.cpp:17
virtual ~QuantumGateBase()
Definition: gate.hpp:90
std::vector< UINT > get_target_index_list() const
Definition: gate.hpp:100
QuantumGateBase()
Definition: gate.hpp:83
std::ostream & operator<<(std::ostream &stream, const QuantumCircuit &circuit)
Definition: circuit.cpp:163
std::vector< UINT > get_control_index_list() const
Definition: gate.hpp:110