Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
5.03k stars 2.32k forks source link

Try loading device topologies from external json #5297

Open nonhermitian opened 3 years ago

nonhermitian commented 3 years ago

What is the expected enhancement?

Related to #5296.

Every time a device with new qubit count comes out it is not supported by Qiskit for some time. Since it has been two+ years since I originally asked for this data to be returned by the systems, I don't think that is going to happen.

Instead, Qiskit should be able to query an online JSON file for the backend physical qubit layouts, e.g.

https://github.com/nonhermitian/ibm_quantum_system_layouts

where this file can be updated much faster than going through the Qiskit release process.

mtreinish commented 3 years ago

So I like having that self contained and queryable, my concern though is tying a function in terra to an external hard coded url. Things on the internet (even github urls maintained by one of us) aren't around forever. This was an issue we had with the interactive visualizations which was pulling in the actual code for visualization from a hard coded url from a web server that was taken down. So we just had to remove them in #4438

If we go down this path we should have a method to disable network involvement and work without needing to pull it from github. This could just be having a layout kwarg that lets a user specify a layout directly.

nonhermitian commented 3 years ago

I personally have it so that it loads the external json first and if not there fall back to the local copy. One has to keep two files in sync but it does not seem like the end of the world. Of course, if there is a more stable url then great.

nonhermitian commented 3 years ago

Perhaps a doi?