Observable.hpp 1.33 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*******************************************************************************
 * Copyright (c) 2019 UT-Battelle, LLC.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Eclipse Distribution License v1.0 which accompanies this
 * distribution. The Eclipse Public License is available at
 * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
 *License is available at https://eclipse.org/org/documents/edl-v10.php
 *
 * Contributors:
 *   Alexander J. McCaskey - initial API and implementation
 *******************************************************************************/
#ifndef XACC_IR_OBSERVABLE_HPP_
#define XACC_IR_OBSERVABLE_HPP_
15
#include "CompositeInstruction.hpp"
16
17
#include "Utils.hpp"

18
19
namespace xacc {

20
class Observable : public Identifiable {
21
public:
Mccaskey, Alex's avatar
Mccaskey, Alex committed
22

23
24
  virtual std::vector<std::shared_ptr<CompositeInstruction>>
  observe(std::shared_ptr<CompositeInstruction> CompositeInstruction) = 0;
Mccaskey, Alex's avatar
Mccaskey, Alex committed
25

26
  virtual const std::string toString() = 0;
27
  virtual void fromString(const std::string str) = 0;
28
  virtual const int nBits() = 0;
29
30
  virtual void fromOptions(const HeterogeneousMap && options) {
      fromOptions(options);
31
32
      return;
  }
33
  virtual void fromOptions(const HeterogeneousMap& options) = 0;
34
35
36
37
};

} // namespace xacc
#endif