Skip to content

Fix mixer forwarding | Fix MPI implementation | Add test cases#452

Merged
kvmto merged 10 commits intoNVIDIA:mainfrom
kaiqiy-nv:kaiqiy/bug-fix-combined
Mar 13, 2026
Merged

Fix mixer forwarding | Fix MPI implementation | Add test cases#452
kvmto merged 10 commits intoNVIDIA:mainfrom
kaiqiy-nv:kaiqiy/bug-fix-combined

Conversation

@kaiqiy-nv
Copy link
Contributor

Fix mixer (referenceHamiltonian) forwarding in qaoa Python binder.
Fix MPI implementation in adapt simulator.
Add test cases to validate the above modifications.

Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 26, 2026

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.

@bmhowe23
Copy link
Collaborator

/ok to test ebb568f

@bmhowe23
Copy link
Collaborator

This CI failure looks unrelated to this PR. It may have been caused by a previous PR. Will need to investigate.

@bmhowe23
Copy link
Collaborator

/ok to test 000960a

@bmhowe23
Copy link
Collaborator

This CI failure looks unrelated to this PR. It may have been caused by a previous PR. Will need to investigate.

This should be fixed by #453

@kaiqiy-nv
Copy link
Contributor Author

Just a kind reminder that this PR is for NVBug 5933231 and NVBug 5933312.

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Mar 8, 2026

/ok to test d4f1930

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Mar 9, 2026

Just a kind reminder that this PR is for NVBug 5933231 and NVBug 5933312.

Hi @kaiqiy-nv - could you please investigate these CI failures from the "Build wheels" job for this PR? https://github.com/NVIDIA/cudaqx/actions/runs/22824100177

Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
@kaiqiy-nv
Copy link
Contributor Author

==================================== ERRORS ====================================
_________ ERROR collecting libs/solvers/python/tests/test_adapt_mpi.py _________
libs/solvers/python/tests/test_adapt_mpi.py:20: in <module>
    cudaq.mpi.initialize()
E   RuntimeError: No MPI support can be found when attempted to use cudaq::mpi APIs. Please refer to the documentation for instructions to activate MPI support.

Hello @bmhowe23 , those errors are caused by the new MPI tests. I am not sure if the CI supports MPI already, but I have updated the test cases (both gtest and pytest) to let them more compatible with the environment. Please have another /ok to test. Thanks.

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Mar 9, 2026

/ok to test c283051

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Mar 9, 2026

It looks like there are some per-PR CI failures now.

There are also some different "Build wheels" failures here:

Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
@kaiqiy-nv
Copy link
Contributor Author

Again both of them are related to MPI tests.
For the PR workflow job, it is because the UCX PML is not supported on the CPU-only CI runner.
For the Build Wheels job, it seems that the CUDA-Q installed by the automation script was not built with MPI supports.
Therefore,
(1) I have reformed the gtests and pytests involving MPI again to make sure it can skip testing if the platform does not support MPI or cudaq::mpi fully.
(2) I have made a small change on the PR workflow config to let the ctest use ob1 instead of the default ucx.

Please have another try. Thanks.

@bmhowe23
Copy link
Collaborator

/ok to test 3029dcc

@bmhowe23
Copy link
Collaborator

Thanks, @kaiqiy-nv. Now all tests are passing, which is great. It looks good to me, but @wsttiger or @kvmto, could you please give it a quick review to make sure you are ok with it, too?

@bmhowe23 bmhowe23 requested review from kvmto and wsttiger March 10, 2026 23:18
Copy link
Collaborator

@kvmto kvmto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good to me!
Just two minor comments about the tests :) if possible to address.
I would have added a test to exercise qaoa with an asymmetric mixer like 3.0X0 + 0.1X1 and comparing at fixed parameters.

Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
@kaiqiy-nv
Copy link
Contributor Author

Hello @kvmto , I have updated the python tests accordingly. Please /ok to test and review the latest. Thanks!

@kvmto
Copy link
Collaborator

kvmto commented Mar 12, 2026

/ok to test 52fd669

@kvmto
Copy link
Collaborator

kvmto commented Mar 13, 2026

looks good to me, we can merge!

@kvmto kvmto merged commit f548bf8 into NVIDIA:main Mar 13, 2026
19 checks passed
@kaiqiy-nv kaiqiy-nv deleted the kaiqiy/bug-fix-combined branch March 14, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants