Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
config_element.h
Go to the documentation of this file.
1 /*
2 Created on Fri Jun 26 14:13:26 2020
3 Copyright 2020 Peter Rakyta, Ph.D.
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 
17 @author: Peter Rakyta, Ph.D.
18 */
23 #ifndef CONFIG_ELEMENT_H
24 #define CONFIG_ELEMENT_H
25 
26 
27 #include <string>
28 
29 
34 
35 
36 
37 protected:
38 
40  std::string name;
41 
43  double dval;
45  bool bval;
47  long ival;
49  long long llval;
51  unsigned long long ullval;
52 
53 public:
54 
59 
63 virtual ~Config_Element();
64 
65 
71 void set_property( std::string name_, double val_ );
72 
73 
79 void set_property( std::string name_, bool val_ );
80 
81 
87 void set_property( std::string name_, long val_ );
88 
89 
95 void set_property( std::string name_, long long val_ );
96 
97 
103 void set_property( std::string name_, unsigned long long val_ );
104 
105 
106 
107 
108 
114 void get_property( double& val_ );
115 
116 
122 void get_property( bool& val_ );
123 
124 
130 void get_property( long& val_ );
131 
132 
138 void get_property( long long& val_ );
139 
140 
146 void get_property( unsigned long long& val_ );
147 
148 
149 
150 
151 };
152 
153 
154 #endif //Config_element
unsigned long long ullval
variable to store unsigned long long parameter value
long long llval
variable to store long long parameter value
void get_property(double &val_)
Call to get a double value.
A class describing a universal configuration element.
std::string name
The name of the configuration property.
virtual ~Config_Element()
Destructor of the class.
bool bval
variable to store bool parameter value
Config_Element()
Nullary constructor of the class.
long ival
variable to store int parameter value
void set_property(std::string name_, double val_)
Call to set a double value.
double dval
variable to store double parameter value