-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqre1.hpp
158 lines (80 loc) · 3.21 KB
/
qre1.hpp
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/* =============================================================================
qre1.hpp
================================================================================
Copyright (C) 2018 - 2020 Pablo Edronkin (pablo.edronkin at yahoo.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
============================================================================= */
#ifndef __QRE1_H
#define __QRE1_H
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string.h>
#include <cstring>
#include <vector>
#include <algorithm>
#include <curl/curl.h>
#include <ctime>
using namespace std;
bool qre_vb(std::string p_base_verbosity);
std::string qre_txt(int p_n);
int qre_enable_shots(bool p_enable,
std::string p_base_shots);
std::string qre_gaq(std::string p_s1);
std::string qre_ina(std::string p_s1);
std::string qre_d2s(double p_double);
double qre_s2d(std::string p_s);
std::string qre_i2s(int p_i);
std::string qre_l2s(long unsigned int p_l);
int qre_count_string(std::string p_delim,
std::string p_s);
bool qre_recog(std::string p_s1,
std:: string p_s2);
std::string qre_find_and_replace_all(std::string p_s1,
std::string p_s2,
std::string p_s3);
void qre_show_v(std::string p_base_verbosity,
std::string p_s);
void qre_show_sum_partial_probs(std::string p_base_verbosity,
double p_sprob);
std::string qre_seek_in_file(std::string p_f,
std::string p_v);
std::string qre_seek_in_json(std::string p_j,
std::string p_v);
void qre_show_var(std::string p_t,
std::string p_v);
void qre_show_string(std::string p_t);
void qre_show_conclusion(std::string p_base_verbosity,
std::string p_t,
std::string p_r);
std::string qre_url_encode(std::string p_s);
char *qre_create_header(std::string p_s);
std::string qre_read_qasm_file(std::string p_f);
void qre_store_results(std::string p_base_verbosity,
std::string p_base_results_storage,
std::string p_file,
std::string p_contents_to_store);
int qre_parse_bitnum(std::string p_s);
std::string qre_parse_reg(std::string p_s,
std::string p_type);
std::vector<std::string> qre_parse_data_string(std::string p_base_verbosity,
std::string p_base_data);
std::string qre_what_comes_after_s1(std::string p_s1,
std::string p_s2);
std::vector<std::string> qre_parse_phase_gate(std::string p_s,
std::string p_delim);
long unsigned int qre_parse_br(std::string p_s,
std::string p_qr);
std::string qre_namestamp(std::string p_s1);
std::string qre_timestamp();
#endif // !__QRE1_H