Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Random_Unitary.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 You should have received a copy of the GNU General Public License
18 along with this program. If not, see http://www.gnu.org/licenses/.
19 
20 @author: Peter Rakyta, Ph.D.
21 */
26 #pragma once
27 #include <map>
28 #include <cstdlib>
29 #include <time.h>
30 #include <ctime>
31 #include "common.h"
32 #include "U3.h"
33 #include "CNOT.h"
34 #include "matrix.h"
35 #include "matrix_float.h"
36 #include "matrix_real_float.h"
37 #include "logging.h"
38 
39 
46 Matrix few_CNOT_unitary( int qbit_num, int cnot_num);
47 
48 
49 
57 class Random_Unitary : public logging {
58 
59 public:
61  int dim;
62 
67  Random_Unitary( int dim_in );
68 
74 
82  Matrix Construct_Unitary_Matrix( double* vartheta, double* varphi, double* varkappa );
83 
92  Matrix_float Construct_Unitary_Matrix( float* vartheta, float* varphi, float* varkappa );
93 
101 
102 };
103 
104 
105 
106 
Header file of single-precision complex array storage with automatic and thread safe reference counti...
Matrix few_CNOT_unitary(int qbit_num, int cnot_num)
Call to create a random unitary constructed by CNOT operation between randomly chosen qubits and by r...
Header file for a class containing basic methods for setting up the verbosity level.
Header file for a class representing a CNOT operation.
A class containing basic methods for setting up the verbosity level.
Definition: logging.h:43
int dim
The number of rows in the created unitary.
Header file of complex array storage array with automatic and thread safe reference counting...
Double-precision complex matrix (float64).
Definition: matrix.h:38
Random_Unitary(int dim_in)
Constructor.
A class to create general random unitary matrices according to arXiv:1303.5904v1. ...
Single-precision complex matrix (float32).
Definition: matrix_float.h:41
Header file for commonly used functions and wrappers to CBLAS functions.
Matrix Construct_Unitary_Matrix()
Construct a random unitary with internally generated float64 parameters.