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

Doc example using missing function count_multi_qubit_gates_qiskit #204

Closed
bachase opened this issue Feb 3, 2025 · 1 comment · Fixed by #181
Closed

Doc example using missing function count_multi_qubit_gates_qiskit #204

bachase opened this issue Feb 3, 2025 · 1 comment · Fixed by #181
Labels
bug Something isn't working

Comments

@bachase
Copy link
Collaborator

bachase commented Feb 3, 2025

Describe the bug
The user guide page in the documentation has example code for using ucc to compile a random Clifford circuit. When attempting to run the code, it fails on the line below due to an invalid import.

from ucc.benchmarks.utils import count_multi_qubit_gates_qiskit

To Reproduce

  1. Runpip install ucc or git clone +pip install -e .
  2. Copy and run the script linked above from the docs.
  3. Get the error ModuleNotFoundError: No module named 'ucc.benchmarks'

Expected behavior
The script should run without error.

Additional context
I believe the import is just stale and should be updated to:

from benchmarks.scripts.common import count_multi_qubit_gates_qiskit

However, I'm unclear how the benchmarks module is meant to be distributed? Should it be a submodule of ucc versus a sibling?

If there continue to be example code in the docs, we can also consider testing that code as part of building the docs via doctest to ensure they continue to work.

@bachase bachase added the bug Something isn't working label Feb 3, 2025
@Misty-W
Copy link
Collaborator

Misty-W commented Feb 3, 2025

Thanks for flagging this @bachase, well done!

I added the quick docs fix to PR #181 for some pre-launch cleanup of the docs.

Feel free to open an issue for making benchmarks a submodule of UCC. There may be a good reason why we didn't structure it that way in the first place, but I'm not remembering it at the moment.

@Misty-W Misty-W linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants