Sequential Quantum Gate Decomposer
v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
tmp2db82vtv
squander
src-cpp
common
include
matrix_sparse.h
Go to the documentation of this file.
1
/*
2
Created on Fri Jun 26 14:13:26 2020
3
Copyright (C) 2020 Peter Rakyta, Ph.D.
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see http://www.gnu.org/licenses/.
17
18
@author: Peter Rakyta, Ph.D.
19
*/
25
#ifndef matrix_sparse_H
26
#define matrix_sparse_H
27
28
#include "
matrix.h
"
29
#include <cmath>
30
38
class
Matrix_sparse
{
39
40
public
:
41
int
rows
;
42
43
int
cols
;
44
45
int
NNZ
;
46
47
QGD_Complex16
*
data
;
48
49
int
*
indices
;
50
51
int
*
indptr
;
56
Matrix_sparse
();
57
65
Matrix_sparse
(
QGD_Complex16
* data_in,
int
rows_in,
int
cols_in,
int
NNZ_in,
int
* indices_in,
int
* indptr);
66
67
};
//matrix
68
69
70
71
72
73
74
#endif
Matrix_sparse::indptr
int * indptr
Definition:
matrix_sparse.h:51
Matrix_sparse::data
QGD_Complex16 * data
Definition:
matrix_sparse.h:47
Matrix_sparse
Class to store data of complex arrays and its properties.
Definition:
matrix_sparse.h:38
Matrix_sparse::rows
int rows
Definition:
matrix_sparse.h:41
Matrix_sparse::NNZ
int NNZ
Definition:
matrix_sparse.h:45
Matrix_sparse::cols
int cols
Definition:
matrix_sparse.h:43
Matrix_sparse::indices
int * indices
Definition:
matrix_sparse.h:49
matrix.h
Header file of complex array storage array with automatic and thread safe reference counting...
QGD_Complex16
Structure type representing complex numbers in the SQUANDER package.
Definition:
QGDTypes.h:38
Matrix_sparse::Matrix_sparse
Matrix_sparse()
Default constructor of the class.
Definition:
matrix_sparse.cpp:32
Generated on Sat Jul 12 2025 07:28:11 for Sequential Quantum Gate Decomposer by
1.8.13