Quantum++  v0.8.2
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 
51 using cplx = std::complex<double>;
52 
56 using ket = Eigen::VectorXcd;
57 
61 using bra = Eigen::RowVectorXcd;
62 
66 using cmat = Eigen::MatrixXcd;
67 
71 using dmat = Eigen::MatrixXd;
72 
82 template<typename Scalar> // Eigen::MatrixX_type (where type = Scalar)
83 using dyn_mat = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
84 
94 template<typename Scalar> // Eigen::VectorX_type (where type = Scalar)
95 using dyn_col_vect = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
96 
106 template<typename Scalar> // Eigen::RowVectorX_type (where type = Scalar)
107 using dyn_row_vect = Eigen::Matrix<Scalar, 1, Eigen::Dynamic>;
108 
109 } /* namespace qpp */
110 
111 #endif /* TYPES_H_ */
Eigen::MatrixXd dmat
Real (double precision) dynamic Eigen matrix.
Definition: types.h:71
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:61
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > dyn_mat
Dynamic Eigen matrix over the field specified by Scalar.
Definition: types.h:83
Eigen::VectorXcd ket
Complex (double precision) dynamic Eigen column vector.
Definition: types.h:56
Quantum++ main namespace.
Definition: codes.h:30
std::complex< double > cplx
Complex number in double precision.
Definition: types.h:51
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > dyn_col_vect
Dynamic Eigen column vector over the field specified by Scalar.
Definition: types.h:95
long long int bigint
Big integer.
Definition: types.h:41
Eigen::MatrixXcd cmat
Complex (double precision) dynamic Eigen matrix.
Definition: types.h:66
Eigen::Matrix< Scalar, 1, Eigen::Dynamic > dyn_row_vect
Dynamic Eigen row vector over the field specified by Scalar.
Definition: types.h:107
std::size_t idx
Non-negative integer index.
Definition: types.h:36