The Quantum Exact Simulation Toolkit v4.0.0
Loading...
Searching...
No Matches
cache.hpp
1/** @file
2 * @author Tyson Jones
3 *
4 * @defgroup testutilscache Cache
5 * @ingroup testutils
6 * @brief
7 * Testing utilities which create Quregs across all
8 * available hardware deployments
9 * @{
10 */
11
12#ifndef CACHE_HPP
13#define CACHE_HPP
14
15#include "quest/include/quest.h"
16
17#include "qvector.hpp"
18#include "qmatrix.hpp"
19
20#include <unordered_map>
21#include <vector>
22#include <string>
23#include <tuple>
24
25using quregCache = std::unordered_map<std::string,Qureg>;
26using matrixCache = std::unordered_map<std::string,FullStateDiagMatr>;
27using deployInfo = std::vector<std::tuple<std::string,int,int,int>>;
28
29int getNumCachedQubits();
30deployInfo getSupportedDeployments();
31
32void createCachedFullStateDiagMatrs();
33void destroyCachedFullStateDiagMatrs();
34matrixCache getCachedFullStateDiagMatrs();
35
36void createCachedQuregs();
37void destroyCachedQuregs();
38quregCache getCachedStatevecs();
39quregCache getCachedDensmatrs();
40quregCache getAltCachedStatevecs();
41quregCache getAltCachedDensmatrs();
42
43qvector getRefStatevec();
44qmatrix getRefDensmatr();
45
46
47#endif // CACHE_HPP
48
49/** @} (end defgroup) */