[][src]Function qip::state_ops::make_sparse_matrix_from_function

pub fn make_sparse_matrix_from_function<F: Fn(u64) -> Vec<(u64, Complex<f64>)>>(
    n: usize,
    f: F,
    natural_order: bool
) -> Vec<Vec<(u64, Complex<f64>)>>

Make a vector of vectors of rows (with (column, value)) built from a function f which takes row numbers. natural_order indicates that the lowest indexed qubit is the least significant bit in row and the output column from f