IntegerComparator.inverse

IntegerComparator.inverse()

Invert (take adjoint of) this circuit.

This is done by recursively inverting all gates.

Returns

the inverted circuit

Return type

QuantumCircuit

Raises

CircuitError – if the circuit cannot be inverted.

Examples

input:

┌───┐

q_0: ┤ H ├─────■──────

└───┘┌────┴─────┐

q_1: ─────┤ RX(1.57) ├

└──────────┘

output:

┌───┐

q_0: ──────■──────┤ H ├

┌─────┴─────┐└───┘

q_1: ┤ RX(-1.57) ├─────

└───────────┘