GateIR

class GateIR : public xacc::IR

Public Functions

GateIR()

The nullary Constructor

void addKernel(std::shared_ptr<Function> kernel)

Add a quantum function to this intermediate representation.

Parameters
  • kernel:

std::shared_ptr<Function> getKernel(const std::string &name)

Return the kernel with the given name.

Return

kernel The kernel with given name.

Parameters
  • name: The name of the kernel to return.

bool kernelExists(const std::string &name)

Return true if the kernel with given name exists in this IR.

Return

exists True if kernel exists.

Parameters
  • name: The name of the kernel to return.

std::string toAssemblyString(const std::string &kernelName, const std::string &accBufferVarName)

Return a string representation of this intermediate representation

Return

void persist(std::ostream &outStream)

Persist this IR instance to the given output stream.

Parameters
  • outStream:

void load(std::istream &inStream)

Create this IR instance from the given input stream.

Parameters
  • inStream:

std::vector<std::shared_ptr<Function>> getKernels()

Return all of this IR instance’s kernels.

Return

kernels The kernels this IR contains.

virtual ~GateIR()

The destructor