Skip to content

Display Catalyst Version in quantum-opt --version Output #1586

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

Open
sengthai opened this issue Mar 24, 2025 · 0 comments
Open

Display Catalyst Version in quantum-opt --version Output #1586

sengthai opened this issue Mar 24, 2025 · 0 comments
Labels
good first issue Good for newcomers

Comments

@sengthai
Copy link
Contributor

Current Behavior:
Running the command:

quantum-opt --version

Currently, return:

LLVM (http://llvm.org/):
  LLVM version 19.0.0git
  Optimized build with assertions.

It only displays the LLVM version.

Expected Behavior:
It should also display the Catalyst version alongside the LLVM version. For example:

For example:

Catalyst version 0.10.0
LLVM (http://llvm.org/):
  LLVM version 19.0.0git
  Optimized build with assertions.

Proposed Solution:

  • Update the version printer in mlir/tools/quantum-opt/quantum-opt.cpp to include the Catalyst version.
  • Use the llvm::cl::AddExtraVersionPrinter function, as documented here: AddExtraVersionPrinter

Notes:

  • The Catalyst version is defined in frontend/catalyst/_version.py.
  • The version string should be retrieved from there. If that’s not feasible in C++, an alternative such as pulling the version from the Git metadata or generating it at build time would be great.
@sengthai sengthai added the good first issue Good for newcomers label Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant