-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathcache.hpp
More file actions
77 lines (57 loc) · 1.6 KB
/
Copy pathcache.hpp
File metadata and controls
77 lines (57 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/** @file
* @author Tyson Jones
*
* @defgroup testutilscache Cache
* @ingroup testutils
* @brief
* Testing utilities which create Quregs across all
* available hardware deployments
* @{
*/
#ifndef CACHE_HPP
#define CACHE_HPP
#include "quest.h"
#include "qvector.hpp"
#include "qmatrix.hpp"
#include <unordered_map>
#include <vector>
#include <string>
#include <tuple>
using quregCache = std::unordered_map<std::string,Qureg>;
using matrixCache = std::unordered_map<std::string,FullStateDiagMatr>;
using deployInfo = std::vector<std::tuple<std::string,int,int,int>>;
/*
* CUSTOM CACHE
*
* for obtaining and manually maintaining Quregs of all possible
* deployment types, but with the specified dimensions
*/
quregCache createCustomCachedQuregs(int numQubits, bool isDensityMatrix);
void destroyCustomCachedQuregs(quregCache& cache);
/*
* MAIN CACHE
*
* for obtaining Quregs and FullStateDiagMatrs of all possible
* deployment types, managed by the test utils, and with
* fixed dimensions specific to the test config
*/
int getNumCachedQubits();
deployInfo getSupportedDeployments();
void createCachedFullStateDiagMatrs();
void destroyCachedFullStateDiagMatrs();
matrixCache getCachedFullStateDiagMatrs();
void createCachedQuregs();
void destroyCachedQuregs();
quregCache getCachedStatevecs();
quregCache getCachedDensmatrs();
quregCache getAltCachedStatevecs();
quregCache getAltCachedDensmatrs();
Qureg getArbitraryCachedStatevec();
Qureg getArbitraryCachedDensmatr();
/*
* REFERENCE STATES
*/
qvector getRefStatevec();
qmatrix getRefDensmatr();
#endif // CACHE_HPP
/** @} (end defgroup) */