XACC
qpe.hpp
1 /*******************************************************************************
2  * Copyright (c) 2019 UT-Battelle, LLC.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * and Eclipse Distribution License v1.0 which accompanies this
6  * distribution. The Eclipse Public License is available at
7  * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
8  *License is available at https://eclipse.org/org/documents/edl-v10.php
9  *
10  * Contributors:
11  * Thien Nguyen - initial API and implementation
12  *******************************************************************************/
13 #pragma once
14 
15 #include "Algorithm.hpp"
16 
17 namespace xacc {
18 namespace algorithm {
20 {
21 public:
22  bool initialize(const HeterogeneousMap& parameters) override;
23  const std::vector<std::string> requiredParameters() const override;
24  void execute(const std::shared_ptr<AcceleratorBuffer> buffer) const override;
25  std::vector<double> execute(const std::shared_ptr<AcceleratorBuffer> buffer, const std::vector<double> &parameters) override;
26  const std::string name() const override { return "QPE"; }
27  const std::string description() const override { return ""; }
28  DEFINE_ALGORITHM_CLONE(QuantumPhaseEstimation)
29 
30 private:
31  CompositeInstruction* m_eigenStatePrep;
32  CompositeInstruction* m_oracle;
33  Accelerator* m_qpu;
34  HeterogeneousMap m_params;
35 };
36 } // namespace algorithm
37 } // namespace xacc
Definition: Algorithm.hpp:34
const std::string name() const override
Definition: qpe.hpp:26
Definition: Accelerator.hpp:25
Definition: Accelerator.hpp:44
Definition: heterogeneous.hpp:45
Definition: CompositeInstruction.hpp:72
const std::string description() const override
Definition: qpe.hpp:27