bloqade.native.stdlib.simple.swap
← Module overview
function
source
functionswap¶source
bloqade.native.stdlib.simple.swap
def swap(qubit1: qubit.Qubit, qubit2: qubit.Qubit)Apply a SWAP gate on two qubits, exchanging their states.
Parameters
| Name | Type | Description |
|---|---|---|
qubit1 | qubit.Qubit | The first qubit. |
qubit2 | qubit.Qubit | The second qubit. |