KEMBAR78
Support multi-diagonal operator conversion for dynamics by 1tnguyen · Pull Request #2993 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@1tnguyen
Copy link
Collaborator

@1tnguyen 1tnguyen commented Jun 4, 2025

Description

Built upon #2986, we now enable automatic conversion from cuda-q operators (boson, spin, fermion) to cudensitymat multi-diagonal format.

Two control knobs:

  • Minimum dimension: ability to skip multi-diagonal (always using dense) if the sub-system dimension is less than this.

  • Max number of diagonals: if the number of diagonals in the multi-diagonal representation exceeds this threshold, just use dense.

Some initial performance data for the Jaynes–Cummings with various dimensions (N) of the Fock space.

N Multi-diag Dense
10 0.3223 0.799247
20 0.3449 0.983367
40 0.4975 1.19658

i.e., 2-3x speedup.

1tnguyen added 2 commits June 4, 2025 06:14
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
@1tnguyen 1tnguyen force-pushed the tnguyen/sparse-cudm branch from 2f366d5 to a2fe257 Compare June 4, 2025 06:20
1tnguyen and others added 5 commits June 4, 2025 06:23
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
@1tnguyen 1tnguyen requested a review from sacpis June 5, 2025 04:27
github-actions bot pushed a commit that referenced this pull request Jun 5, 2025
@github-actions
Copy link

github-actions bot commented Jun 5, 2025

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

Copy link
Collaborator

@sacpis sacpis left a comment

Choose a reason for hiding this comment

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

A few comments but looks good to me. Thanks @1tnguyen.

1tnguyen and others added 2 commits June 6, 2025 03:48
- Add missing docstrings.

- Rename variables for clarity.

- Refactor code to reduce duplicate.

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
github-actions bot pushed a commit that referenced this pull request Jun 6, 2025
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

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

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

github-actions bot commented Jun 6, 2025

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

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

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

@1tnguyen 1tnguyen merged commit 3cb540a into NVIDIA:main Jun 10, 2025
195 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 10, 2025
@github-actions
Copy link

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

annagrin pushed a commit to annagrin/cuda-quantum that referenced this pull request Jun 17, 2025
* Remove unused python imports and add multi-diagonal operator conversion

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Code format

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Fix a comment

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Fix clang build

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Add docs

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Add docs

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Address code review comments

- Add missing docstrings.

- Rename variables for clarity.

- Refactor code to reduce duplicate.

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

---------

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
@bettinaheim bettinaheim changed the title [Dynamics] Support multi-diagonal operator conversion Support multi-diagonal operator conversion for dynamics Jul 22, 2025
@bettinaheim bettinaheim added performance enhancement New feature or request labels Jul 22, 2025
@bettinaheim bettinaheim added this to the release 0.12.0 milestone Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants