NVIDIA / cuda-quantum

C++ and Python support for the CUDA Quantum programming model for heterogeneous quantum-classical workflows
https://nvidia.github.io/cuda-quantum/
Other
486 stars 179 forks source link

first anyon technologies backend integration pull request #2191

Closed Lambdauv closed 2 weeks ago

Lambdauv commented 3 weeks ago

I have read the Contributor License Agreement and I hereby accept the Terms.

Description

copy-pr-bot[bot] commented 3 weeks ago

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

github-actions[bot] commented 3 weeks ago

CLA Assistant Lite bot All Contributors have signed the CLA.

Lambdauv commented 3 weeks ago

mmenting recheck in this Pull Request

recheck

Lambdauv commented 3 weeks ago

CLA Assistant Lite bot: Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

I have read the Contributor License Agreement and I hereby accept the Terms.

You can retrigger this bot by commenting recheck in this Pull Request

bmhowe23 commented 3 weeks ago

recheck

bmhowe23 commented 3 weeks ago

I think it may have been closed and re-opened too quickly (below). image So I am going to close and re-open it, but I will pause for a few minutes in between to let the bots catch up.

bmhowe23 commented 3 weeks ago

Hi @Lambdauv - I think the CLA bot is happy now, so that's good 😄 .

Could you please run bash scripts/run_clang_format.sh to get the code formatting issues resolved?

Also, it looks like a valid license header is needed on runtime/cudaq/platform/default/rest/helpers/anyon/base64.hpp. If you're ok with it, you can apply the header from - say - this file: runtime/cudaq/qis/qudit.h.

bmhowe23 commented 3 weeks ago

/ok to test

bmhowe23 commented 3 weeks ago

recheck

github-actions[bot] commented 3 weeks ago

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

Lambdauv commented 3 weeks ago

I have read the Contributor License Agreement and I hereby accept the Terms.

Lambdauv commented 3 weeks ago

recheck

schweitzpgi commented 3 weeks ago

/ok to test

Command Bot: Processing...

github-actions[bot] commented 3 weeks ago

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

Lambdauv commented 3 weeks ago

@bmhowe23 would you sharing what Basic content checks / Check code formatting and Basic content checks / Check spelling (pull_request) do?

bmhowe23 commented 3 weeks ago

@bmhowe23 would you sharing what Basic content checks / Check code formatting and Basic content checks / Check spelling (pull_request) do?

The "Check code formatting" job failure can be remedied by running bash scripts/run_clang_format.sh. This needs to be done before every commit.

The "Check spelling" job failure can be debugged by running bash scripts/run_all_spelling.sh -d locally (or looking at the spelling failures listed on the summary page here if you can see it).

Regarding the spell check failures in runtime/cudaq/platform/default/rest/helpers/anyon/base64.hpp, perhaps that file would not be needed if you changed to use llvm::decodeBase64() and llvm::encodeBase64(). I think that would be preferable for code commonality reasons anyway.

The only other spell check failure is utils/mock_qpu/anyon/__init__.py(150) (startServer). That looks like it is commented out code that may not be necessary anyway?

Lambdauv commented 3 weeks ago

@bmhowe23 would you sharing what Basic content checks / Check code formatting and Basic content checks / Check spelling (pull_request) do?

The "Check code formatting" job failure can be remedied by running bash scripts/run_clang_format.sh. This needs to be done before every commit.

The "Check spelling" job failure can be debugged by running bash scripts/run_all_spelling.sh -d locally (or looking at the spelling failures listed on the summary page here if you can see it).

Regarding the spell check failures in runtime/cudaq/platform/default/rest/helpers/anyon/base64.hpp, perhaps that file would not be needed if you changed to use llvm::decodeBase64() and llvm::encodeBase64(). I think that would be preferable for code commonality reasons anyway.

The only other spell check failure is utils/mock_qpu/anyon/__init__.py(150) (startServer). That looks like it is commented out code that may not be necessary anyway?

I definitely ran the bash scripts/run_clang_format.sh before commit and like the last time it didn't really change anything, which still leads to the error over format checking this time.

bmhowe23 commented 3 weeks ago

I definitely ran the bash scripts/run_clang_format.sh before commit and like the last time it didn't really change anything, which still leads to the error over format checking this time.

Ah, I think the reason it is not running on the your base64.hpp file is the script is not processing .hpp files (primarily because do not have any regular .hpp files).

Feel free to run clang-format -i runtime/cudaq/platform/default/rest/helpers/anyon/base64.hpp manually, but as mentioned, I think it would be preferrable to use llvm::decodeBase64() and llvm::encodeBase64() if possible.

(PS - you can revert https://github.com/NVIDIA/cuda-quantum/pull/2191/commits/085ece7c6578321861bab649012946e057c233bb as that had no effect.)

bmhowe23 commented 3 weeks ago

/ok to test

Command Bot: Processing...

Lambdauv commented 3 weeks ago

I definitely ran the bash scripts/run_clang_format.sh before commit and like the last time it didn't really change anything, which still leads to the error over format checking this time.

Ah, I think the reason it is not running on the your base64.hpp file is the script is not processing .hpp files (primarily because do not have any regular .hpp files).

Feel free to run clang-format -i runtime/cudaq/platform/default/rest/helpers/anyon/base64.hpp manually, but as mentioned, I think it would be preferrable to use llvm::decodeBase64() and llvm::encodeBase64() if possible.

(PS - you can revert 085ece7 as that had no effect.)

Thanks, just did that and it indeed changed the base64.hpp. Thank a lot for the help! I will switch to llvm::encodeBase64 in the next PR as this was validated for working with our remote REST server already.

Lambdauv commented 3 weeks ago

llvm::encodeBase64()

Just

I definitely ran the bash scripts/run_clang_format.sh before commit and like the last time it didn't really change anything, which still leads to the error over format checking this time.

Ah, I think the reason it is not running on the your base64.hpp file is the script is not processing .hpp files (primarily because do not have any regular .hpp files). Feel free to run clang-format -i runtime/cudaq/platform/default/rest/helpers/anyon/base64.hpp manually, but as mentioned, I think it would be preferrable to use llvm::decodeBase64() and llvm::encodeBase64() if possible. (PS - you can revert 085ece7 as that had no effect.)

Thanks, just did that and it indeed changed the base64.hpp. Thank a lot for the help! I will switch to llvm::encodeBase64 in the next PR as this was validated for working with our remote REST server already.

as the last attempt didn't work....i just switched to llvm::encodeBase64 to make the format checking bot happy.

bmhowe23 commented 3 weeks ago

Sorry for the swirl on this @Lambdauv. Can you see the details of the failure on this page: https://github.com/NVIDIA/cuda-quantum/actions/runs/10724371201? It shows the exact files that that are causing the failures, along with the changes that are needed.

It is currently failing on Python formatting now, not C++: image

This can be remedied by applying the patch provided there, or by running yapf -i --style google utils/mock_qpu/anyon/__init__.py locally.

Lambdauv commented 3 weeks ago

Sorry for the swirl on this @Lambdauv. Can you see the details of the failure on this page: https://github.com/NVIDIA/cuda-quantum/actions/runs/10724371201? It shows the exact files that that are causing the failures, along with the changes that are needed.

It is currently failing on Python formatting now, not C++: image

This can be remedied by applying the patch provided there, or by running yapf -i --style google utils/mock_qpu/anyon/__init__.py locally.

thanks for pointing out, updated the python script as suggested

bmhowe23 commented 3 weeks ago

/ok to test

Command Bot: Processing...

github-actions[bot] commented 3 weeks ago

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

bmhowe23 commented 2 weeks ago

/ok to test

Command Bot: Processing...

github-actions[bot] commented 2 weeks ago

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

bmhowe23 commented 2 weeks ago

/ok to test

Command Bot: Processing...

github-actions[bot] commented 2 weeks ago

CUDA Quantum Docs Bot: A preview of the documentation can be found here.