[−][src]Function qip::state_ops::make_sparse_matrix_op
pub fn make_sparse_matrix_op(
indices: Vec<u64>,
dat: Vec<Vec<(u64, Complex<f64>)>>,
natural_order: bool
) -> Result<UnitaryOp, CircuitError>
Make a SparseMatrix UnitaryOp from a vector of rows (with (column, value)
).
natural_order indicates that the lowest indexed qubit is the least significant bit in column
and row
where row
is the index of dat
.