QuantumModel

Trait QuantumModel 

Source
pub trait QuantumModel: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn predict(&self, input: &ArrayD<f64>) -> Result<ArrayD<f64>>;
    fn metadata(&self) -> &ModelMetadata;
    fn save(&self, path: &str) -> Result<()>;
    fn load(path: &str) -> Result<Box<dyn QuantumModel>>
       where Self: Sized;
    fn architecture(&self) -> String;
    fn training_config(&self) -> TrainingConfig;
}
Expand description

Trait for quantum models in the zoo

Required Methods§

Source

fn name(&self) -> &str

Model name

Source

fn predict(&self, input: &ArrayD<f64>) -> Result<ArrayD<f64>>

Make prediction

Source

fn metadata(&self) -> &ModelMetadata

Get model metadata

Source

fn save(&self, path: &str) -> Result<()>

Save model to file

Source

fn load(path: &str) -> Result<Box<dyn QuantumModel>>
where Self: Sized,

Load model from file

Source

fn architecture(&self) -> String

Get model architecture description

Source

fn training_config(&self) -> TrainingConfig

Get training configuration

Implementors§