XACC
rbm.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  * Alexander J. McCaskey - initial API and implementation
12  *******************************************************************************/
13 #ifndef XACC_DWAVE_GENERATORS_RBM_HPP_
14 #define XACC_DWAVE_GENERATORS_RBM_HPP_
15 
16 #include "AnnealingProgram.hpp"
17 #include "Circuit.hpp"
18 
19 namespace xacc {
20 namespace dwave {
22 protected:
23  std::vector<InstructionParameter> parameters;
24 
25 public:
26  RBM() : AnnealingProgram("rbm-ap") {}
27  bool expand(const xacc::HeterogeneousMap &runtimeOptions) override;
28  const std::vector<std::string> requiredKeys() override;
29  std::shared_ptr<Instruction> clone() override {
30  return std::make_shared<RBM>();
31  }
32 
34  getParameter(const std::size_t idx) const override {
35  return parameters[idx];
36  }
37 };
38 
40 protected:
41  std::vector<InstructionParameter> parameters;
42 public:
44  void applyRuntimeArguments() override;
45  bool expand(const xacc::HeterogeneousMap &runtimeOptions) override {return false;}
46  const std::vector<std::string> requiredKeys() override {return {"nv","nh"};}
48  getParameter(const std::size_t idx) const override {
49  return parameters[idx];
50  }
51  DEFINE_CLONE(RBMAsCircuitType);
52 };
53 } // namespace dwave
54 } // namespace xacc
55 #endif
Definition: rbm.hpp:39
Definition: Circuit.hpp:29
Definition: Accelerator.hpp:25
Definition: heterogeneous.hpp:45
Definition: AnnealingProgram.hpp:24
Definition: heterogeneous.hpp:240
Definition: rbm.hpp:21