Trait AlgorithmTemplate

Source
pub trait AlgorithmTemplate:
    Debug
    + Send
    + Sync {
    // Required methods
    fn synthesize(
        &self,
        spec: &AlgorithmSpecification,
    ) -> QuantRS2Result<SynthesizedCircuit>;
    fn estimate_resources(
        &self,
        spec: &AlgorithmSpecification,
    ) -> QuantRS2Result<ResourceEstimates>;
    fn get_template_info(&self) -> TemplateInfo;
    fn validate_specification(
        &self,
        spec: &AlgorithmSpecification,
    ) -> QuantRS2Result<()>;
}
Expand description

Algorithm template trait

Required Methods§

Source

fn synthesize( &self, spec: &AlgorithmSpecification, ) -> QuantRS2Result<SynthesizedCircuit>

Generate circuit from specification

Source

fn estimate_resources( &self, spec: &AlgorithmSpecification, ) -> QuantRS2Result<ResourceEstimates>

Estimate resources without full synthesis

Source

fn get_template_info(&self) -> TemplateInfo

Get template information

Source

fn validate_specification( &self, spec: &AlgorithmSpecification, ) -> QuantRS2Result<()>

Validate algorithm specification

Implementors§