Circuit.replace
- Circuit.replace(point, op)[source]
Replace the operation at point with op.
- Parameters:
point (
CircuitPointLike
) – The index of the operation to replace.op (
Operation
) – The to-be-inserted operation.
- 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