Quantum++  v0.8
C++11 quantum computing library
types.h
Go to the documentation of this file.
1 /*
2  * Quantum++
3  *
4  * Copyright (c) 2013 - 2015 Vlad Gheorghiu (vgheorgh@gmail.com)
5  *
6  * This file is part of Quantum++.
7  *
8  * Quantum++ is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * Quantum++ is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with Quantum++. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
27 #ifndef TYPES_H_
28 #define TYPES_H_
29 
30 namespace qpp
31 {
32 
36 using idx = std::size_t;
37 
41 using bigint = long long int;
42 
46 using ubigint = unsigned long long int;
47 
48 
52 using cplx = std::complex<double>;
53 
57 using ket = Eigen::VectorXcd;
58 
62 using bra = Eigen::RowVectorXcd;
63 
67 using cmat = Eigen::MatrixXcd;
68 
72 using dmat = Eigen::MatrixXd;
73 
83 template<typename Scalar> // Eigen::MatrixX_type (where type = Scalar)
84 using dyn_mat = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
85 
95 template<typename Scalar> // Eigen::VectorX_type (where type = Scalar)
96 using dyn_col_vect = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
97 
107 template<typename Scalar> // Eigen::RowVectorX_type (where type = Scalar)
108 using dyn_row_vect = Eigen::Matrix<Scalar, 1, Eigen::Dynamic>;
109 
110 } /* namespace qpp */
111 
112 #endif /* TYPES_H_ */
Eigen::MatrixXd dmat
Real (double precision) dynamic Eigen matrix.
Definition: types.h:72
unsigned long long int ubigint
Non-negative big integer.
Definition: types.h:46
Eigen::RowVectorXcd bra
Complex (double precision) dynamic Eigen row vector.
Definition: types.h:62
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > dyn_mat
Dynamic Eigen matrix over the field specified by Scalar.
Definition: types.h:84
Eigen::VectorXcd ket
Complex (double precision) dynamic Eigen column vector.
Definition: types.h:57
Quantum++ main namespace.
Definition: codes.h:30
std::complex< double > cplx
Complex number in double precision.
Definition: types.h:52
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > dyn_col_vect
Dynamic Eigen column vector over the field specified by Scalar.
Definition: types.h:96
long long int bigint
Big integer.
Definition: types.h:41
Eigen::MatrixXcd cmat
Complex (double precision) dynamic Eigen matrix.
Definition: types.h:67
Eigen::Matrix< Scalar, 1, Eigen::Dynamic > dyn_row_vect
Dynamic Eigen row vector over the field specified by Scalar.
Definition: types.h:108
std::size_t idx
Non-negative integer index.
Definition: types.h:36