IR¶
-
class
IR: public xacc::Persistable¶ The IR interface is the base interface for derived accelerator-specific intermediate representations. At this level, an intermediate representation can be persisted to an assembly-like string, can be read in from file, and can be persisted to file.
Subclassed by xacc::quantum::DWIR, xacc::quantum::GateIR
Public Functions
-
virtual std::string
toAssemblyString(const std::string &kernelName, const std::string &accBufferVarName) = 0¶ Return a assembly-like string representation of this intermediate representation
- Return
- Parameters
kernelName: The name of hte kernel to persist to stringaccBufferVarName: The name of the AcceleratorBuffer
Add a new kernel to this IR instance.
- Parameters
kernel: The Function instance to add as a new kernel
-
virtual bool
kernelExists(const std::string &name) = 0¶ 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.
-
virtual std::shared_ptr<Function>
getKernel(const std::string &name) = 0¶ Return the kernel with the given name.
- Return
kernel The kernel with given name.
- Parameters
name: The name of the kernel to return.
-
virtual std::vector<std::shared_ptr<Function>>
getKernels() = 0¶ Return all of this IR instance’s kernels.
- Return
kernels The kernels this IR contains.
-
virtual
~IR()¶ The destructor
-
virtual std::string