Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure 9 from paper does not use proper depth #7

Closed
nonhermitian opened this issue Oct 28, 2021 · 5 comments
Closed

Figure 9 from paper does not use proper depth #7

nonhermitian opened this issue Oct 28, 2021 · 5 comments

Comments

@nonhermitian
Copy link

In the paper https://arxiv.org/abs/2110.03137 it is said that the depth calculation for circuits is done using the basis set ['rx', 'ry', 'rz', 'cx']. However when looking at Fig 9 of the paper the reported depth does not match what the depth is when the circuit is decomposed to the indicated basis. Namely the routine just does a decompose

before passing on to execute that computes the depth of this decomposition:

This does not decompose to the correct basis, and the circuits are much shorter than they should be. At 7 qubits, the decomposed depth is 31, which matches Fig 9., but the actual depth with the correct basis is 78. The same is true for the circuits that are swap mapped to the Casablanca system, where I get an avg depth of 117.

@rtvuser1
Copy link
Collaborator

Fig 9 in the paper does show a "Circuit Depth" of 31 as you mention (after one level of decompose).
But it also shows the "Transpiled Depth" as ~78 which you also indicate is the correct depth. What is shown in the bar chart seems to match your numbers. I am not clear what it is that you are reporting as incorrect ... perhaps you can clarify?

Note that the "Transpiled Depth" is what we use as a "normalized" depth for the x coordinate in the volumetric plots.

The assumption was also made is that the transpilation does not account for connectivity, so the larger depth due to swapping of qubits will not show in these charts. They are intended to represent a normalized depth independent of any knowledge of connectivity. The other issue you mentioned about qubit mapping might address some of this concern. See the comment there.

@nonhermitian
Copy link
Author

Ok I see. It is a bit confusing because there is only a mention of the basis set [‘rx’, ‘ry’, ‘rz’, ‘cx’], which is not what decompose() gives you. The end of Sec 3C also says:

‘circuit depth’ always refers to our normalized
definition for circuit depth unless otherwise stated

which makes you think it uses the above mentioned basis set given that the figure legend says "Circuit Depth" for the decomposed data. The only way the corresponding transpiled data could be any deeper is if going to the IBM default basis and including swaps.

@rtvuser1
Copy link
Collaborator

I agree it is a bit confusing. Concrete suggestions on how to make clear both in the repo and paper are welcome!
Note that the decompose(0 is primarily being used to "flatten" the circuits, as we use subcircuits everywhere

@nonhermitian
Copy link
Author

I would just use the "transpiled" data for the "Gate depth" data and just drop the former. There is no need for the decomposed data as the decomposition definitions are someone arbitrary. It also clears things up a bit because when listing fidelities right above "transpiled" depths, it is natural to assume that that depth is what was run on the HW to generate the corresponding fidelity right above it.

@rtvuser1
Copy link
Collaborator

Closed after clarification on the explanation in the paper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants