qiskit.ml.circuit.library.RawFeatureVector.reverse_ops¶
-
RawFeatureVector.
reverse_ops
()¶ Reverse the circuit by reversing the order of instructions.
This is done by recursively reversing all instructions. It does not invert (adjoint) any gate.
- Returns
the reversed circuit.
- Return type
Examples
- input:
┌───┐
- q_0: ┤ H ├─────■──────
└───┘┌────┴─────┐
- q_1: ─────┤ RX(1.57) ├
└──────────┘
- output:
┌───┐
- q_0: ─────■──────┤ H ├
┌────┴─────┐└───┘
- q_1: ┤ RX(1.57) ├─────
└──────────┘