Functions

  • Apply op to the input, storing the results in output. If either start at a nonzero state index in their 0th index, use input/output_offset.
  • Apply ops to the input, storing the results in output. If either start at a nonzero state index in their 0th index, use input/output_offset. This is much less efficient as compared to repeated applications of apply_op, if your ops can be applied in sequence, do so with apply_op.
  • Get the index for a submatrix indexed by indices given the full_index for the larger 2^n by 2^n matrix.
  • Get the ith qubit index for op
  • Given the sub_index for the submatrix, and a base to overwrite values, get the full index for the 2^n by 2^n matrix.