QuantumIRProvider.hpp 1.22 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef QUANTUM_IRPROVIDER_HPP_
#define QUANTUM_IRPROVIDER_HPP_

#include "Identifiable.hpp"

#include "IRProvider.hpp"

namespace xacc {
namespace quantum {

class QuantumIRProvider : public IRProvider {

public:
  QuantumIRProvider() = default;
Mccaskey, Alex's avatar
Mccaskey, Alex committed
15
16

  const int getNRequiredBits(const std::string name) override;
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  std::shared_ptr<Instruction> createInstruction(const std::string name,
                                                         std::size_t bit) override;
  std::shared_ptr<Instruction>
  createInstruction(const std::string name, std::vector<std::size_t> bits,
                    std::vector<InstructionParameter> parameters =
                        std::vector<InstructionParameter>{}) override;

  std::shared_ptr<CompositeInstruction>
  createComposite(const std::string name,
                  std::vector<std::string> variables = {}) override;

  std::shared_ptr<IR> createIR() override;

  std::vector<std::string> getInstructions() override;

  const std::string name() const override { return "quantum"; }
  const std::string description() const override {
    return "This IRProvider implementation "
           "generates and returns gate and annealing instructions.";
  }
};

} // namespace quantum
} // namespace xacc

#endif