qiskit.circuit.QuantumCircuit.swap¶
- QuantumCircuit.swap(qubit1, qubit2)[fuente]¶
Apply
SwapGate
.For the full matrix form of this gate, see the underlying gate documentation.
- Parámetros
qubit1 (
Union
[Qubit
,QuantumRegister
,int
,slice
,Sequence
[Union
[Qubit
,int
]]]) – The qubits to apply the gate to.qubit2 (
Union
[Qubit
,QuantumRegister
,int
,slice
,Sequence
[Union
[Qubit
,int
]]]) – The qubits to apply the gate to.
- Tipo del valor devuelto
- Devuelve
A handle to the instructions created.