Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
SWAP.h
Go to the documentation of this file.
1 /*
2 Created on Fri Jun 26 14:13:26 2020
3 Copyright 2020 Peter Rakyta, Ph.D.
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 
17 @author: Peter Rakyta, Ph.D.
18 */
23 #ifndef SWAP_H
24 #define SWAP_H
25 
26 #include "matrix.h"
27 #include "Gate.h"
28 #define _USE_MATH_DEFINES
29 #include <math.h>
30 
31 
35 class SWAP: public Gate {
36 
37 protected:
38 
39 public:
40 
44 SWAP();
45 
46 
52 SWAP(int qbit_num_in, const std::vector<int>& target_qbits_in);
53 
57 ~SWAP() override;
58 
63 virtual SWAP* clone() override;
64 
65 
66 };
67 
68 #endif //SWAP
Header file for a class for the representation of general gate operations.
A class representing a SWAP operation.
Definition: SWAP.h:35
SWAP()
Nullary constructor of the class.
Definition: SWAP.cpp:30
Header file of complex array storage array with automatic and thread safe reference counting...
Base class for the representation of general gate operations.
Definition: Gate.h:86
~SWAP() override
Destructor of the class.
Definition: SWAP.cpp:80
virtual SWAP * clone() override
Call to create a clone of the present class.
Definition: SWAP.cpp:89