What does QV really mean?
I’m working on a three-qubit circuit for a paper, so I can’t show the actual circuit just yet, but the key information about it is that all three qubits are connected. Two-qubit CNOT operations are performed between the first and second qubits, the first and third qubits, and the second and third qubits. Look at qubits 0, 1, and 2 in the connectivity diagram above, as well as qubits 2, 3, and 4. That’s what I need.
On a quantum computing simulator, connectivity is no problem; every qubit is magically connected to every other qubit. On real hardware however, this is far from the case. If two qubits need to be connected that are not connected, their quantum states need to be moved around via SWAP operations until their states are on connected qubits.
If you want to perform a CNOT operation on qubits 0 and 3 in the above connectivity diagram, for example, either qubits 0 and 2 need to be swapped or qubits 2 and 3 need to be swapped. The SWAP operation, however, depending on how physically far apart two qubits are, requires a minimum of three CNOT operations.
And there’s the problem. Single-qubit operations introduce errors; that’s beyond the scope of this article. CNOTs introduce even more errors; that’s also beyond the scope of this article. And, SWAP operations, therefore, introduce at least three CNOTs' worth of errors. Keep in mind that three CNOTs is the absolute minimum required per SWAP, and that swapped-around states might need to be swapped around further to allow other CNOT operations within the circuit. That’s a lot of potential errors.
My Best Device
IBM Quantum recently started listing devices from best to worst. At the top of my list sits ibmq_santiago, which has a Quantum Volume of 32 (QV32). I have another QV32 device available, ibmq_athens, but ibmq_santiago has lower average error rates.
The problem with ibmq_santiago is that there is no triangle in its connectivity diagram. No three qubits are connected. This device definitely requires error-introducing SWAP operations for what I need to do.
My Worst Device
Ironically, the last device on my list is the only one with the qubit connectivity I need. The ibmq_5_yorktown device is only QV8 and has the highest average error rates of all the devices available to me.
Despite having the highest error rates, however, there are two triangles in this connectivity diagram that I can use. Both options eliminate the need for SWAP operations, thus preventing the errors that those SWAP operations would introduce.
Bit Flip Error
The ideal result below is a 100% probability of measuring |111>. I’ve reported the bit flip error; the same circuit measures |111> with a probability of 1 on two different simulators and two different real devices, so something is amiss with ibmq_5_yorktown today. What I’m looking at anyway is the probability of measuring the top result.
Notwithstanding the bit flip error, ibmq_5_yorktown’s top result is about 71% without needing any SWAPs. So, out of curiosity, how bad would the results be on ibmq_santiago after adding a bunch of SWAPs?
Quantum Volume in Action
The first circuit that I ran on ibmq_santiago was not optimized. I just ran it as-is, and the top result was only 54%. I was about to proclaim that connectivity trumps QV, but then I took a moment to select the qubits a little more carefully.
By using different qubits, ibmq_santiago outperformed ibmq_5_yorktown despite needing multiple SWAP operations to run. The average error rates are so much lower on the QV32 device, that adding a bunch of CNOT errors still results in less overall errors than the QV8 device.
There Can Be More Than One
Apologies to Highlander fans for that heading.
If my best device only slightly outperforms my “worst" device, I have to wonder how the other QV32 device performs. It’s average error rates are worse than one but better than the other.
As you can see, the connectivity diagram for ibmq_athens is the same as for ibmq_santiago. The number of SWAPs required should be the same. Therefore, we are really comparing the qubit quality and the connectivity quality of the two QV32 devices.
Surprisingly, ibmq_athens performed better than ibmq_santiago. With both devices, I selected the best three-qubit combinations in regards to qubit error rates and connection error rates. While ibmq_santiago has better overall averages, ibmq_athens had the best qubit trio today.
When you read about Quantum Volume or hear about Quantum Volume, what does it really mean? I compared a QV8 device with optimal connectivity to two QV32 devices with non-optimal connectivity, and both QV32 devices produced better results despite the use of error-prone SWAP operations. While that’s not an explanation of Quantum Volume, I hope that’s a satisfying demonstration of it.
Thanks to IBM Quantum for all the images in this article, plus for generally being awesome. I can’t think of any place that I could go to locally and use a classical desktop computer for free, and yet I can use uber-expensive quantum processors for free? It’s the ultimate “try before you buy" experience.