XACC
exp.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_GENERATORS_EXP_HPP_
14 #define XACC_GENERATORS_EXP_HPP_
15 
16 #include "Circuit.hpp"
17 #include <expression_parsing_util.hpp>
18 
19 namespace xacc {
20 namespace circuits {
21 class Exp : public xacc::quantum::Circuit {
22 protected:
23  std::vector<std::string> rz_expressions;
24  std::shared_ptr<ExpressionParsingUtil> parsingUtil;
25  std::map<std::string, int> vector_mapping;
26 public:
27  Exp() : Circuit("exp_i_theta") {}
28  void applyRuntimeArguments() override;
29  void addArgument(std::shared_ptr<CompositeArgument> arg,
30  const int idx_of_inst_param) override {
31  arguments.push_back(arg);
32  vector_mapping.insert({arg->name, idx_of_inst_param});
33  }
34  bool expand(const xacc::HeterogeneousMap &runtimeOptions) override;
35  const std::vector<std::string> requiredKeys() override;
36  DEFINE_CLONE(Exp);
37 };
38 } // namespace circuits
39 } // namespace xacc
40 #endif
Definition: Circuit.hpp:29
Definition: exp.hpp:21
Definition: Accelerator.hpp:25
Definition: heterogeneous.hpp:45