Differentiator

Trait Differentiator 

Source
pub trait Differentiator: Send + Sync {
    // Required methods
    fn differentiate(
        &self,
        circuit: &DynamicCircuit,
        parameters: &[f64],
        observable: &Observable,
        backend: &dyn SimulatorBackend,
    ) -> Result<Vec<f64>>;
    fn name(&self) -> &str;
}
Expand description

Differentiator trait for computing gradients of quantum circuits

Required Methods§

Source

fn differentiate( &self, circuit: &DynamicCircuit, parameters: &[f64], observable: &Observable, backend: &dyn SimulatorBackend, ) -> Result<Vec<f64>>

Compute gradients of expectation values with respect to parameters

Source

fn name(&self) -> &str

Get the name of the differentiator

Implementors§