[][src]Module qip::iterators

Structs

ControlledOpIterator

Iterator which provides the indices of nonzero columns for a given row of a COp

FunctionOpIterator

Iterator which provides the indices of nonzero columns for a given function f.

MatrixOpIterator

Iterator which provides the indices of nonzero columns for a given row of a matrix

MultiOpIterator

Iterator which provides the indices of nonzero columns for a given row of a matrix

SparseMatrixOpIterator

Iterator which provides the indices of nonzero columns for a given row of a matrix

SwapOpIterator

Iterator which provides the indices of nonzero columns for a given row of a SwapOp

Enums

PrecisionQubitOp

A private version of QubitOp with variable precision, this is used so we can change the f64 default qubit op to a variable one at the beginning of execution and not at each operation.

Functions

fold_for_op_cols
precision_get_index

Get the ith qubit index for op

precision_num_indices

Get the number of indices represented by op

sum_for_op_cols

Using the function f which maps from a column and row to a complex value for the op matrix, sums for all nonzero entries for a given op more efficiently than trying each column between 0 and 2^nindices. This really needs to be cleaned up, but runs in a tight loop. This makes it hard since Box is unfeasible and the iterator types aren't the same size.

sum_for_ops_cols