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§
Sourcefn synthesize(
&self,
spec: &AlgorithmSpecification,
) -> QuantRS2Result<SynthesizedCircuit>
fn synthesize( &self, spec: &AlgorithmSpecification, ) -> QuantRS2Result<SynthesizedCircuit>
Generate circuit from specification
Sourcefn estimate_resources(
&self,
spec: &AlgorithmSpecification,
) -> QuantRS2Result<ResourceEstimates>
fn estimate_resources( &self, spec: &AlgorithmSpecification, ) -> QuantRS2Result<ResourceEstimates>
Estimate resources without full synthesis
Sourcefn get_template_info(&self) -> TemplateInfo
fn get_template_info(&self) -> TemplateInfo
Get template information
Sourcefn validate_specification(
&self,
spec: &AlgorithmSpecification,
) -> QuantRS2Result<()>
fn validate_specification( &self, spec: &AlgorithmSpecification, ) -> QuantRS2Result<()>
Validate algorithm specification