Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
matrix.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 */
24 #ifndef matrix_H
25 #define matrix_H
26 
27 #include "matrix_base.hpp"
28 #include <cmath>
29 
30 
38 class Matrix : public matrix_base<QGD_Complex16> {
39 
41  char padding[CACHELINE-48];
42 
43 public:
44 
49 Matrix();
50 
58 Matrix( QGD_Complex16* data_in, int rows_in, int cols_in);
59 
60 
69 Matrix( QGD_Complex16* data_in, int rows_in, int cols_in, int stride_in);
70 
71 
78 Matrix( int rows_in, int cols_in);
79 
80 
88 Matrix( int rows_in, int cols_in, int stride_in);
89 
90 
91 
96 Matrix(const Matrix &in);
97 
98 
103 Matrix copy();
104 
105 
110 bool isnan();
111 
112 
113 
117 void print_matrix() const;
118 
119 
120 }; //matrix
121 
122 
123 
124 
125 
126 
127 #endif
bool isnan()
Call to check the array for NaN entries.
Definition: matrix.cpp:128
char padding[CACHELINE-48]
padding class object to cache line borders
Definition: matrix.h:41
Matrix()
Default constructor of the class.
Definition: matrix.cpp:36
void print_matrix() const
Call to prints the stored matrix on the standard output.
Definition: matrix.cpp:148
#define CACHELINE
Definition: QGDTypes.h:33
Base Class to store data of arrays and its properties.
Definition: matrix_base.hpp:38
Structure type representing complex numbers in the SQUANDER package.
Definition: QGDTypes.h:38
Class to store data of complex arrays and its properties.
Definition: matrix.h:38
Matrix copy()
Call to create a copy of the matrix.
Definition: matrix.cpp:105