My goal is to minimize accumulated error when entangling two qubits that cannot be entangled via a single native two qubit gate operation.

I have a coupling map/graph for the qubits of an IBM quantum computer. Two nodes that share an edge can be used for a native two qubit gate operation. This is required to entangle the qubits. If I don't have a connection between two potentially distant (many qubits and their edges needed to connect the two) qubits, I have to use these intermediate qubits (for swaps) to entangle the two distant qubits. As far as I understood.

My question is the following. Let's say I want to perform a CNOT between $q_0$ and $q_n$ but the qubits are connected like a chain: $\{(q_0, q_1), (q_1, q_2),\dots, (q_{n-1}, q_n)\}.$ I would first CNOT($q_0, q_1$) then SWAP($q_1, q_2$), then SWAP($q_2, q_3$), and so on to finally SWAP($q_{n-1}, q_n$). The CNOT and SWAP operations require the use of the two qubit gate operation. If I know how large the two qubit gate error for each pair ($q_i, q_{i+1}$) is and how the CNOT and SWAP are decomposed into native gates, how can I compute the total accumulated error?


1 Answer 1


Instead of leading with CNOT q0,q1 as you have written, you would use SWAP until you have your control and target on a physical pair of qubits that have native CNOT available as an operation.

Since you have a linear chain, you would have to consider if errors in CNOT and SWAP vary depending on direction.

If more than one path is available you would need something like Dijkstra's algorithm or one of the noise-aware circuit placement algorithms.

  • $\begingroup$ To keep it simple, let us ignore single qubit gate errors. Yes, you are right about the order. However, I don't really care about these details. In the end I will have a sequence of native two qubit gate operations along this chain and I want to know the accumulated error based on that sequence. Can you give some reference to noise-aware circuit placement algorithms? Thank you. $\endgroup$
    – ty.
    Sep 13, 2023 at 23:12

Your Answer

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

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