Expand description
Helper functions for using iterators for matrix multiplication
Functionsยง
- apply_
op - Apply
opto theinput, adding the results tooutput. If either start at a nonzero state index in their 0th index, useinput/output_offset. - apply_
op_ overwrite - Apply
opto theinput, adding the results tooutput. If either start at a nonzero state index in their 0th index, useinput/output_offset. - apply_
op_ row - Compute vector element at a given row from op applied to input.
- apply_
op_ row_ indices - Compute vector element at a given row from op applied to input.
- apply_
ops - Apply
opsto theinput, adding the results tooutput. If either start at a nonzero state index in their 0th index, useinput/output_offset. This is much less efficient as compared to repeated applications ofapply_op, if your ops can be applied in sequence, do so withapply_op. - full_
to_ sub - Get the index for a submatrix indexed by
indicesgiven thefull_indexfor the larger 2^n by 2^n matrix. - get_
index - Get the
ith qubit index forop - sub_
to_ full - Given the
sub_indexfor the submatrix, and a base to overwrite values, get the full index for the 2^n by 2^n matrix.