Skip to content

Conversation

@huaweil-nv
Copy link
Collaborator

Description

When checking the coverage of evolution.py (http://porting-server/cuda-quantum/20250924/cudaq/pycoverage/python--cudaq--dynamics--evolution.py.html#t570), it was found that this part of the test is missing.
Bug fixes in evolution.py:

  • Fix missing return statement in evolve_single_async when collapse_operators is provided with store_intermediate_results=NONE mode
  • Fix condition check: use 'store_intermediate_results != NONE' instead of boolean check on enum value

Test improvements:

  • Add test_evolve_no_intermediate_results and test_evolve_async_no_intermediate_results tests

@huaweil-nv huaweil-nv requested a review from 1tnguyen November 25, 2025 06:25
@copy-pr-bot
Copy link

copy-pr-bot bot commented Nov 25, 2025

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.

Bug fixes in evolution.py:
- Fix missing return statement in evolve_single_async when collapse_operators
  is provided with store_intermediate_results=NONE mode
- Fix condition check: use 'store_intermediate_results != NONE' instead of
  boolean check on enum value

Test improvements:
- Fix expectation_values() access pattern in test to correctly handle nested
  list structure
- Fix intermediate_states() assertion: NONE mode returns 1 (final state only)
- Add test_evolve_no_intermediate_results for sync version coverage

Signed-off-by: huaweil <[email protected]>
@huaweil-nv huaweil-nv force-pushed the evolve-none-mode-tests branch from b5620bc to 30a0e00 Compare November 25, 2025 06:33
@1tnguyen
Copy link
Collaborator

1tnguyen commented Nov 25, 2025

/ok to test 30a0e00

Command Bot: Processing...

Copy link
Collaborator

@1tnguyen 1tnguyen left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks @huaweil-nv!

github-actions bot pushed a commit that referenced this pull request Nov 25, 2025
@github-actions
Copy link

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

@1tnguyen 1tnguyen merged commit b5825be into NVIDIA:main Nov 25, 2025
369 of 372 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 25, 2025
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.

2 participants