Skip to content

bloqade.native.stdlib.simple.swap

← Module overview

functionswapsource

bloqade.native.stdlib.simple.swap

def swap(qubit1: qubit.Qubit, qubit2: qubit.Qubit)

Apply a SWAP gate on two qubits, exchanging their states.

Parameters

NameTypeDescription
qubit1qubit.QubitThe first qubit.
qubit2qubit.QubitThe second qubit.
source