Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
matrix_real.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 
18 @author: Peter Rakyta, Ph.D.
19 */
25 #ifndef matrix_real_H
26 #define matrix_real_H
27 
28 #include "matrix_base.hpp"
29 #include <cmath>
30 
31 class Matrix_real_float;
32 
33 
41 class Matrix_real : public matrix_base<double> {
42 
44  char padding[CACHELINE-48];
45 
46 public:
47 
52 Matrix_real();
53 
61 Matrix_real( double* data_in, int rows_in, int cols_in);
62 
63 
72 Matrix_real( double* data_in, int rows_in, int cols_in, int stride_in);
73 
74 
81 Matrix_real( int rows_in, int cols_in);
82 
83 
91 Matrix_real( int rows_in, int cols_in, int stride_in);
92 
93 
94 
99 Matrix_real(const Matrix_real &in);
100 
106 Matrix_real& operator=(const Matrix_real &mtx);
107 
112 Matrix_real copy() const;
113 
118 void copy_to(Matrix_real& target) const;
119 
124 void copy_to(Matrix_real_float& target) const;
125 
126 
131 bool isnan();
132 
133 
134 }; //matrix
135 
136 
137 
138 
139 
140 
141 #endif
Class to store single-precision real arrays and properties.
Matrix_real copy() const
Call to create a copy of the matrix.
char padding[CACHELINE-48]
padding class object to cache line borders
Definition: matrix_real.h:44
#define CACHELINE
Definition: QGDTypes.h:33
Base Class to store data of arrays and its properties.
Definition: matrix_base.hpp:38
bool isnan()
Call to check the array for NaN entries.
void copy_to(Matrix_real &target) const
Copy the matrix to a reusable double-precision target matrix.
Matrix_real()
Default constructor of the class.
Definition: matrix_real.cpp:36
Matrix_real & operator=(const Matrix_real &mtx)
Assignment operator of the class.
Class to store data of complex arrays and its properties.
Definition: matrix_real.h:41