Circuit.get_operation

Circuit.get_operation(point)[source]

Retrieve the operation at the point.

Parameters:

point (CircuitPointLike) – The circuit point position of the operation.

Raises:

IndexError – If no operation exists at the point specified.

Returns:

The operation at point.

Return type:

Operation

Examples

>>> from bqskit.ir.gates import HGate, CNOTGate
>>> circuit = Circuit(2)
>>> circuit.append_gate(HGate(), [0])
>>> circuit.append_gate(CNOTGate(), [0, 1])
>>> circuit.get_operation((1, 0))
CNOTGate@(0, 1)