Quantum++  v0.6
C++11 quantum computing library
qpp.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 
22 // IMPORTANT: instantiation of global singletons
23 // Init, Codes, Gates, States and RandomDevices
24 //
25 // Any additional singletons should be instantiated here
26 // Includes all necessary headers (except "matlab.h")
27 // ALWAYS include it in main.cpp
28 
34 #ifndef QPP_H_
35 #define QPP_H_
36 
37 #include <algorithm>
38 #include <chrono>
39 #include <cmath>
40 #include <complex>
41 #include <cstdlib>
42 #include <cstring>
43 #include <ctime>
44 #include <exception>
45 #include <fstream>
46 #include <functional>
47 #include <initializer_list>
48 #include <iomanip>
49 #include <iostream>
50 #include <iterator>
51 #include <limits>
52 #include <numeric>
53 #include <ostream>
54 #include <random>
55 #include <sstream>
56 #include <stdexcept>
57 #include <string>
58 #include <tuple>
59 #include <type_traits>
60 #include <utility>
61 #include <vector>
62 
63 #include <Eigen/Dense>
64 #include <Eigen/SVD>
65 
66 // do not change the order in this group, inter-dependencies
67 #include "types.h"
68 #include "classes/exception.h"
69 #include "constants.h"
70 #include "internal/util.h"
72 #include "input_output.h"
73 
74 // do not change the order in this group, inter-dependencies
76 #include "classes/init.h"
77 #include "functions.h"
78 #include "classes/codes.h"
79 #include "classes/gates.h"
80 #include "classes/states.h"
81 #include "classes/random_devices.h"
82 
83 // do not change the order in this group, inter-dependencies
84 #include "operations.h"
85 #include "entropies.h"
86 #include "entanglement.h"
87 
88 // the ones below can be in any order, no inter-dependencies
89 #include "random.h"
90 #include "classes/timer.h"
91 #include "instruments.h"
92 #include "number_theory.h"
93 
94 
99 namespace qpp
100 {
101 
108 
115 
122 
129 
139 
140 } /* namespace qpp */
141 
142 #endif /* QPP_H_ */
static thread_local RandomDevices & get_thread_local_instance() noexcept(std::is_nothrow_constructible< RandomDevices >::value)
Definition: singleton.h:100
const Codes & codes
qpp::Codes const Singleton
Definition: qpp.h:114
Singleton pattern via CRTP.
Type aliases.
Initialization.
Entanglement functions.
Constants.
const Singleton class that implements most commonly used gates
Definition: gates.h:37
Quantum++ main namespace.
Definition: codes.h:30
const Singleton class that performs additional initializations/cleanups
Definition: init.h:38
Quantum operation functions.
Number theory functions.
Quantum states.
const Singleton class that implements most commonly used states
Definition: states.h:37
Timing.
Exceptions.
Measurement functions.
Singeleton class that manages the source of randomness in the library.
Definition: random_devices.h:46
const Singleton class that defines quantum error correcting codes
Definition: codes.h:37
Input/output manipulators.
thread_local RandomDevices & rdevs
qpp::RandomDevices Singleton
Definition: qpp.h:138
Input/output functions.
Entropy functions.
Internal utility functions.
const Init & init
qpp::Init const Singleton
Definition: qpp.h:107
const Gates & gt
qpp::Gates const Singleton
Definition: qpp.h:121
Generic quantum computing functions.
Random devices.
static const Init & get_instance() noexcept(std::is_nothrow_constructible< const Init >::value)
Definition: singleton.h:90
Quantum error correcting codes.
Randomness-related functions.
Quantum gates.
const States & st
qpp::States const Singleton
Definition: qpp.h:128