# Why does Qiskit swap gate accept registers, but cswap doesn't?

In Qiskit, I am trying to perform controlled-Swap (cswap) of two registers, but an error occurs:

from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute, IBMQ, Aer

c = ClassicalRegister(1)
ancilla = QuantumRegister( 1 )
phi = QuantumRegister(4, 'phi')
psi = QuantumRegister(4, 'psi')
qc = QuantumCircuit(ancilla, phi, psi, c)
qc.h(ancilla)
qc.swap(phi, psi)
qc.cswap(ancilla[0], phi, psi)


The swap works, exchanging each qubit of the first register (phi) with each qubit of the second register (psi), I expected that the cswap would work in the same way but the following error occurs:

qiskit.qiskiterror.QiskitError: "QuantumRegister(4, 'phi') is not a tuple.A qubit should be formated as a tuple."


I have read this answer but it didn't help

• What version of qiskit are you running? I tested your code out in qiskit v0.11.1, and it did not give me that error. It did what was expected. – Matthew Stypulkoski Aug 6 at 13:59
• The version I am using is the same, what can be the reason? – Macalcubo Aug 6 at 14:01
• Are all of your other qiskit versions the same? This is my list of versions: {'qiskit': '0.11.1', 'qiskit-terra': '0.8.2', 'qiskit-ignis': '0.1.1', 'qiskit-aer': '0.2.3', 'qiskit-ibmq-provider': '0.3.1', 'qiskit-aqua': '0.5.3'} you can get this by running qiskit.__qiskit_version__ – Matthew Stypulkoski Aug 6 at 14:11
• I created a new environment with just qiskit 0.11.1 and now it is working ... – Macalcubo Aug 6 at 14:20