qiskit.circuit.QuantumCircuit.reverse_ops¶
- QuantumCircuit.reverse_ops()[source]¶
Reverse the circuit by reversing the order of instructions.
This is done by recursively reversing all instructions. It does not invert (adjoint) any gate.
- রিটার্নস
the reversed circuit.
- রিটার্ন টাইপ
Examples
input:
┌───┐ q_0: ┤ H ├─────■────── └───┘┌────┴─────┐ q_1: ─────┤ RX(1.57) ├ └──────────┘
output:
┌───┐ q_0: ─────■──────┤ H ├ ┌────┴─────┐└───┘ q_1: ┤ RX(1.57) ├───── └──────────┘