Circuit.replace

Circuit.replace(point, op)[source]

Replace the operation at point with op.

Parameters:
Raises:
  • IndexError – If there is no operation at point.

  • ValueError – If op cannot be placed on the circuit due to either an invalid location or gate radix mismatch.

  • ValueError – If point.qudit is not in op.location