Trait Compilable

Source
pub trait Compilable:
    DynClone
    + Send
    + Sync
    + 'static {
    // Required method
    fn to_ir(
        &self,
        targets: Vec<usize>,
        controls: Vec<usize>,
    ) -> Vec<InstructionIR>;
}
Expand description

Trait for operators or measurements that can be compiled into an IR representation

This trait defines the to_ir method, which converts an operator into an IR representation. The IR representation is a structured format that can be used for further processing, such as optimisation or execution on a quantum circuit simulator or hardware.

Required Methods§

Source

fn to_ir(&self, targets: Vec<usize>, controls: Vec<usize>) -> Vec<InstructionIR>

Converts the operation into an IR representation

§Returns

A vector of InstructionIR representing the operation in IR format.

Implementors§