@@ -25,25 +25,25 @@ class Configuration {
25
25
struct Execution {
26
26
dd::fp numericalTolerance = dd::RealNumber::eps;
27
27
28
- bool parallel = true ;
28
+ bool parallel = true ;
29
29
std::size_t nthreads = std::max(2U , std::thread::hardware_concurrency());
30
- double timeout = 0 .; // in seconds
30
+ double timeout = 0 .; // in seconds
31
31
32
32
bool runConstructionChecker = false ;
33
- bool runSimulationChecker = true ;
34
- bool runAlternatingChecker = true ;
35
- bool runZXChecker = true ;
33
+ bool runSimulationChecker = true ;
34
+ bool runAlternatingChecker = true ;
35
+ bool runZXChecker = true ;
36
36
};
37
37
38
38
// configuration options for pre-check optimizations
39
39
struct Optimizations {
40
- bool fuseSingleQubitGates = true ;
41
- bool reconstructSWAPs = true ;
40
+ bool fuseSingleQubitGates = true ;
41
+ bool reconstructSWAPs = true ;
42
42
bool removeDiagonalGatesBeforeMeasure = false ;
43
- bool transformDynamicCircuit = false ;
44
- bool reorderOperations = true ;
45
- bool backpropagateOutputPermutation = false ;
46
- bool elidePermutations = true ;
43
+ bool transformDynamicCircuit = false ;
44
+ bool reorderOperations = true ;
45
+ bool backpropagateOutputPermutation = false ;
46
+ bool elidePermutations = true ;
47
47
};
48
48
49
49
// configuration options for application schemes
@@ -56,30 +56,30 @@ class Configuration {
56
56
ApplicationSchemeType::Proportional;
57
57
58
58
// options for the gate cost application scheme
59
- std::string profile;
59
+ std::string profile;
60
60
CostFunction costFunction = &legacyCostFunction;
61
61
};
62
62
63
63
struct Functionality {
64
- double traceThreshold = 1e-8 ;
65
- bool checkPartialEquivalence = false ;
64
+ double traceThreshold = 1e-8 ;
65
+ bool checkPartialEquivalence = false ;
66
66
};
67
67
68
68
// configuration options for the simulation scheme
69
69
struct Simulation {
70
- double fidelityThreshold = 1e-8 ;
71
- std::size_t maxSims = computeMaxSims();
72
- StateType stateType = StateType::ComputationalBasis;
73
- std::size_t seed = 0U ;
74
- bool storeCEXinput = false ;
75
- bool storeCEXoutput = false ;
70
+ double fidelityThreshold = 1e-8 ;
71
+ std::size_t maxSims = computeMaxSims();
72
+ StateType stateType = StateType::ComputationalBasis;
73
+ std::size_t seed = 0U ;
74
+ bool storeCEXinput = false ;
75
+ bool storeCEXoutput = false ;
76
76
77
77
// this function makes sure that the maximum number of simulations is
78
78
// configured properly.
79
79
static std::size_t computeMaxSims () {
80
- constexpr std::size_t defaultMaxSims = 16U ;
80
+ constexpr std::size_t defaultMaxSims = 16U ;
81
81
constexpr std::size_t defaultConfiguredOtherCheckers = 2U ;
82
- const auto systemThreads = std::thread::hardware_concurrency ();
82
+ const auto systemThreads = std::thread::hardware_concurrency ();
83
83
// catch the case where hardware_concurrency() returns 0 or the other
84
84
// pre-configured checkers already use up all the available threads
85
85
if (systemThreads < defaultConfiguredOtherCheckers) {
@@ -91,15 +91,15 @@ class Configuration {
91
91
};
92
92
93
93
struct Parameterized {
94
- double parameterizedTol = 1e-12 ;
94
+ double parameterizedTol = 1e-12 ;
95
95
std::size_t nAdditionalInstantiations = 0 ;
96
96
};
97
97
98
- Execution execution{};
98
+ Execution execution{};
99
99
Optimizations optimizations{};
100
- Application application{};
100
+ Application application{};
101
101
Functionality functionality{};
102
- Simulation simulation{};
102
+ Simulation simulation{};
103
103
Parameterized parameterized{};
104
104
105
105
[[nodiscard]] bool anythingToExecute () const noexcept ;
0 commit comments