qiskit.circuit.QuantumCircuit.cswap¶
- QuantumCircuit.cswap(control_qubit, target_qubit1, target_qubit2, label=None, ctrl_state=None)[fuente]¶
Apply
CSwapGate
.For the full matrix form of this gate, see the underlying gate documentation.
- Parámetros
control_qubit (
Union
[Qubit
,QuantumRegister
,int
,slice
,Sequence
[Union
[Qubit
,int
]]]) – The qubit(s) used as the control.target_qubit1 (
Union
[Qubit
,QuantumRegister
,int
,slice
,Sequence
[Union
[Qubit
,int
]]]) – The qubit(s) targeted by the gate.target_qubit2 (
Union
[Qubit
,QuantumRegister
,int
,slice
,Sequence
[Union
[Qubit
,int
]]]) – The qubit(s) targeted by the gate.label (
Optional
[str
]) – The string label of the gate in the circuit.ctrl_state (
Union
[int
,str
,None
]) – The control state in decimal, or as a bitstring (e.g. “1”). Defaults to controlling on the “1” state.
- Tipo del valor devuelto
- Devuelve
A handle to the instructions created.