Let's say there is a qubit at position $i$, and I want to move it to position $i'$. Without loss of generality, let's say $i < i'$. By 'move it' I mean, perform multiple $SWAP$ operations so that every qubit at positions $i<j<i'$ is moved over one position, so that they are moved to position $j' = j - 1$, and the qubit at position $i$ is moved to the qubit position $i'$.

This would be implemented using $i' - i$ number of $SWAP$ gates. Denote $SWAP_{k,k+1}$ as the $SWAP$ gate swapping qubits at positions $k$ and $k+1$. In Python-style pseudocode, this would be the way to implement the gate I am describing:

for k in range(i,i'):

I feel like there should be a name for the gate I am describing. If not, I want to call it something like $MOVETO_{i,i'}$ or $SHIFT_{i,i'}$.

Any suggestions?

  • 2
    $\begingroup$ I'd still call it the SWAP gate (on non - adjacent qubits). $\endgroup$ Jun 4, 2022 at 19:58
  • $\begingroup$ @NikitaNemkov not really, because for instance qubit number $i+1$ gets mapped at position $i$ $\endgroup$ Jun 4, 2022 at 21:27

1 Answer 1


Note that the first SWAP places qubit $i+1$ at position $i$. The second one places qubit $i+2$ at position $i+1$. Eventually, the qubit number $k$ will be at place $k-1$ for $k>i$, while qubit $i$ will be placed at position $i'$.

Thus, this operation already has a name: it's a circular shift, or bitwise rotation. Specifically, it's a left circular shift by 1 position.

  • $\begingroup$ That's very helpful, thanks. I wonder if there is a name for this gate that follows the naming convention of other gates? In QC, gates seem to be label in all caps, usually with a small amount of letters. ($CNOT$, $SWAP$, $H$, etc...) $\endgroup$ Jun 6, 2022 at 15:42
  • $\begingroup$ Maybe it should be named $CIRCSHIFT$ $\endgroup$ Jun 6, 2022 at 15:43
  • $\begingroup$ ...or just $CIRC$ $\endgroup$ Jun 6, 2022 at 15:50
  • $\begingroup$ I've been doing a bit of digging around to see if someone else has named the gate this way. The closest thing I found was this paper (see figure 4): researchgate.net/publication/… $\endgroup$ Jun 6, 2022 at 16:53
  • $\begingroup$ @QuantumGuy123 I'm not sure what your goal is, but it seems that there is no convention for naming this gate. That's why it's just called the cyclic shift operation in the article you've linked. Thus, if you want to refer to this gate, you can feel free to name it the way you want, as long as you make sure that its name is clear enough and that you define it in your article. For instance, someone reading your paper and seeing the $SHIFT$ gate may think this is in fact the $SWAP$ gate, just named differently. Thus, make sure to clearly state and define what this gate is and you'll be fine. $\endgroup$ Jun 7, 2022 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.