Spanish
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.circuit.QuantumCircuit.inverse

QuantumCircuit.inverse()[fuente]

Invert (take adjoint of) this circuit.

This is done by recursively inverting all gates.

Devuelve

the inverted circuit

Tipo del valor devuelto

QuantumCircuit

Muestra

CircuitError – if the circuit cannot be inverted.

Ejemplos

input:

     ┌───┐
q_0: ┤ H ├─────■──────
     └───┘┌────┴─────┐
q_1: ─────┤ RX(1.57) ├
          └──────────┘

output:

                  ┌───┐
q_0: ──────■──────┤ H ├
     ┌─────┴─────┐└───┘
q_1: ┤ RX(-1.57) ├─────
     └───────────┘