documentation
documentation copied to clipboard
Add support for parsing OpenQASM gate definitions
We now have a Sphinx extension for documenting OpenQASM projects, which the Qiskit team have some (small) interest in using in our own API documentation. In particular, the "there are additional instructions" bullet of https://docs.quantum.ibm.com/api/qiskit/qasm2#legacy-compatibility would be better with it, and we'll likely want to use it when documenting the results of Qiskit/qiskit#10737 for users.
There are a couple of examples of how the documentation works in rST and the generated HTML (inspect element) in the project's documentation of its .. gate
directive. There should be an objects.inv
file generated by Sphinx at https://openqasm.com/openqasm-sphinx/objects.inv as well, which (at the time of writing) produced:
cx oq:gate 1 index.html#$ -
rz oq:gate 1 index.html#$ -
for the relevant two components, so identical to the Python system.
This is super low priority: there's no need for it in Qiskit any time soon, and Qiskit/qiskit#10737 has just become low priority for us to implement anyway.