gate_merge.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "gate.hpp"
10 #include "gate_matrix.hpp"
11 
12 namespace gate {
20  DllExport QuantumGateMatrix* merge(const QuantumGateBase* gate_applied_first, const QuantumGateBase* gate_applied_later);
21 
28  DllExport QuantumGateMatrix* merge(std::vector<const QuantumGateBase*> gate_list);
29 
38  DllExport QuantumGateMatrix* add(const QuantumGateBase* gate1, const QuantumGateBase* gate2);
39 
47  DllExport QuantumGateMatrix* add(std::vector<const QuantumGateBase*> gate_list);
48 
57 
66  DllExport QuantumGateBase* Probabilistic(std::vector<double> distribution, std::vector<QuantumGateBase*> gate_list);
67 
75  DllExport QuantumGateBase* CPTP(std::vector<QuantumGateBase*> gate_list);
76 
85  DllExport QuantumGateBase* Instrument(std::vector<QuantumGateBase*> gate_list, UINT classical_register_address);
86 
95  DllExport QuantumGateBase* Adaptive(QuantumGateBase* gate, std::function<bool(const std::vector<UINT>&)> func);
96 }
#define DllExport
Definition: type.hpp:30
Definition and basic functions for QuantumGate.
QuantumGateMatrix * merge(const QuantumGateBase *gate_first, const QuantumGateBase *gate_second)
Definition: gate_merge.cpp:246
Definition: gate_matrix.hpp:9
QuantumGateBase * CPTP(std::vector< QuantumGateBase *> gate_list)
Definition: gate_merge.cpp:347
Definition: gate_factory.cpp:17
DllExport QuantumGateMatrix * add(std::vector< const QuantumGateBase *> gate_list)
Definition: gate_merge.cpp:290
QuantumGateBase * Probabilistic(std::vector< double > distribution, std::vector< QuantumGateBase *> gate_list)
Definition: gate_merge.cpp:343
QuantumGateBase * Adaptive(QuantumGateBase *gate, std::function< bool(const std::vector< UINT > &)> func)
Definition: gate_merge.cpp:355
QuantumGateBase * Instrument(std::vector< QuantumGateBase *> gate_list, UINT classical_register_address)
Definition: gate_merge.cpp:351
QuantumGateMatrix * to_matrix_gate(const QuantumGateBase *gate)
Definition: gate_merge.cpp:337
Definition: gate.hpp:75