13 #ifndef XACC_ALGORITHM_ADAPT_HPP_ 14 #define XACC_ALGORITHM_ADAPT_HPP_ 16 #include "Algorithm.hpp" 17 #include "Observable.hpp" 18 #include "PauliOperator.hpp" 31 virtual std::vector<std::shared_ptr<Observable>>
32 generate(
const int &nQubits) = 0;
34 virtual std::string operatorString(
const int index) = 0;
36 virtual std::shared_ptr<CompositeInstruction>
37 getOperatorInstructions(
const int opIdx,
const int varIdx)
const = 0;
43 std::shared_ptr<Observable> observable;
44 std::shared_ptr<Optimizer> optimizer;
45 std::shared_ptr<Accelerator> accelerator;
46 std::shared_ptr<OperatorPool> pool;
47 std::shared_ptr<CompositeInstruction> initialState;
53 double _adaptThreshold = 1.0e-2;
54 double _printThreshold = 1.0e-10;
55 bool _printOps =
false;
58 std::vector<int> checkpointOps;
59 std::vector<double> checkpointParams;
62 std::string gradStrategyName =
"parameter-shift-gradient";
67 const std::vector<std::string> requiredParameters()
const override;
68 void execute(
const std::shared_ptr<AcceleratorBuffer> buffer)
const override;
69 const std::string
name()
const override {
return "adapt"; }
72 DEFINE_ALGORITHM_CLONE(
ADAPT)
Definition: Algorithm.hpp:34
Definition: Accelerator.hpp:25
const std::string description() const override
Definition: adapt.hpp:70
const std::string name() const override
Definition: adapt.hpp:69
Definition: heterogeneous.hpp:45
Definition: Identifiable.hpp:25
Definition: DefaultParameterSetter.cpp:17