Quantum++  v0.6
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 cplx = std::complex<double>;
42 
46 using ket = Eigen::VectorXcd;
47 
51 using bra = Eigen::RowVectorXcd;
52 
56 using cmat = Eigen::MatrixXcd;
57 
61 using dmat = Eigen::MatrixXd;
62 
72 template<typename Scalar> // Eigen::MatrixX_type (where type = Scalar)
73 using dyn_mat = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
74 
84 template<typename Scalar> // Eigen::VectorX_type (where type = Scalar)
85 using dyn_col_vect = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
86 
96 template<typename Scalar> // Eigen::RowVectorX_type (where type = Scalar)
97 using dyn_row_vect = Eigen::Matrix<Scalar, 1, Eigen::Dynamic>;
98 
99 } /* namespace qpp */
100 
101 #endif /* TYPES_H_ */
Eigen::MatrixXd dmat
Real (double precision) dynamic Eigen matrix.
Definition: types.h:61
Eigen::RowVectorXcd bra
Complex (double precision) dynamic Eigen row vector.
Definition: types.h:51
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > dyn_mat
Dynamic Eigen matrix over the field specified by Scalar.
Definition: types.h:73
Eigen::VectorXcd ket
Complex (double precision) dynamic Eigen column vector.
Definition: types.h:46
Quantum++ main namespace.
Definition: codes.h:30
std::complex< double > cplx
Complex number in double precision.
Definition: types.h:41
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > dyn_col_vect
Dynamic Eigen column vector over the field specified by Scalar.
Definition: types.h:85
Eigen::MatrixXcd cmat
Complex (double precision) dynamic Eigen matrix.
Definition: types.h:56
Eigen::Matrix< Scalar, 1, Eigen::Dynamic > dyn_row_vect
Dynamic Eigen row vector over the field specified by Scalar.
Definition: types.h:97
std::size_t idx
Non-negative integer index.
Definition: types.h:36