Circuit.remove_all

Circuit.remove_all(op)[source]

Removes the all occurrences of op in the circuit.

Parameters:

op (Operation | Gate) – The Operation or Gate to remove.

Raises:
  • ValueError – If the op doesn’t exist in the circuit.

  • ValueError – If op could not have been placed on the circuit due to either an invalid location or gate radix mismatch.

See also

remove()