5 #include "Identifiable.hpp"
6 #include "heterogeneous.hpp"
7 #include "qcor_pimpl.hpp"
12 class CompositeInstruction;
16 using LocalOpaqueInstPtr = std::shared_ptr<xacc::Instruction>;
31 std::size_t nLogicalBits();
32 std::size_t nPhysicalBits();
33 std::size_t nVariables();
34 std::shared_ptr<CompositeInstruction> operator()(
const std::vector<double>& x);
36 std::shared_ptr<xacc::Identifiable> get_as_opaque();
37 std::shared_ptr<xacc::CompositeInstruction> as_xacc();
39 const std::string name()
const;
43 void setName(
const std::string name);
45 LocalOpaqueInstPtr getInstruction(
const std::size_t idx);
46 std::vector<LocalOpaqueInstPtr> getInstructions();
47 void removeInstruction(
const std::size_t idx);
48 void replaceInstruction(
const std::size_t idx, LocalOpaqueInstPtr newInst);
49 void insertInstruction(
const std::size_t idx, LocalOpaqueInstPtr newInst);
53 void addInstruction(LocalOpaqueInstPtr instruction);
54 void addInstruction(std::shared_ptr<CompositeInstruction> composite);
55 void addInstructions(std::vector<LocalOpaqueInstPtr> &instruction);
56 void addInstructions(
const std::vector<LocalOpaqueInstPtr> &instruction);
57 void addInstructions(
const std::vector<LocalOpaqueInstPtr> &&insts,
58 bool shouldValidate =
true);
60 void attachMetadata(
const int instId, xacc::HeterogeneousMap &&m);
61 std::string toString();