Skip to content

Make ordering of matrix class configurable - #3126

Merged
bettinaheim merged 17 commits into
NVIDIA:mainfrom
amccaskey:remove_pybind_runtime
Jul 22, 2025
Merged

bettinaheim merged 17 commits into
NVIDIA:mainfrom
amccaskey:remove_pybind_runtime

Conversation

@amccaskey

@amccaskey amccaskey commented Jun 27, 2025 •

Copy link
Copy Markdown
Collaborator

Looking through some other PRs, I saw pybind code in cudaq/utils/matrix.h (note it was just forward declared there) and Python functions were marked as friend. The reason for this was to allow Python runtime code to have access to the raw data pointer for the complex_matrix.

This removes those declarations and the pybind forward declaration, and exposes a get_data(complex_matrix::order) method on complex_matrix. To avoid relying on internal ordering convention, the function requires an explicit argument to define whether the data is expected to be column major or row major. If the requested order does not match the current data format, the internal representation will be reordered as needed. Correspondingly, to avoid unnecessary reordering, the order can now also be provided upon construction of the matrix.

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 27, 2025

Copy link
Copy Markdown

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.

@amccaskey

amccaskey commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator Author

/ok to test

Command Bot: Processing...

@copy-pr-bot

copy-pr-bot Bot commented Jun 30, 2025

Copy link
Copy Markdown

/ok to test

@amccaskey, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@amccaskey

amccaskey commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator Author

/ok to test 91f0aad

Command Bot: Processing...

@amccaskey

amccaskey commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator Author

/ok to test

Command Bot: Processing...

@copy-pr-bot

copy-pr-bot Bot commented Jun 30, 2025

Copy link
Copy Markdown

/ok to test

@amccaskey, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@amccaskey

amccaskey commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator Author

/ok to test a175366

Command Bot: Processing...

@schweitzpgi schweitzpgi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@schweitzpgi
schweitzpgi enabled auto-merge (squash) June 30, 2025 23:21
@amccaskey

amccaskey commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator Author

/ok to test 6e94c91

Command Bot: Processing...

@schweitzpgi

schweitzpgi commented Jul 1, 2025 •

Copy link
Copy Markdown
Collaborator

/ok to test 0e40efb

Command Bot: Processing...

@amccaskey

amccaskey commented Jul 1, 2025 •

Copy link
Copy Markdown
Collaborator Author

/ok to test e59b2fa

Command Bot: Processing...

Comment thread runtime/cudaq/utils/matrix.h Resolved
@amccaskey

amccaskey commented Jul 1, 2025 •

Copy link
Copy Markdown
Collaborator Author

/ok to test 9da8559

Command Bot: Processing...

Comment thread runtime/cudaq/utils/matrix.h Resolved
bettinaheim and others added 8 commits July 11, 2025 14:00
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
@bettinaheim

bettinaheim commented Jul 18, 2025 •

Copy link
Copy Markdown
Collaborator

/ok to test 2c5eac6

Command Bot: Processing...

@bettinaheim bettinaheim changed the title Remove references to PyBind from C++ runtime code Make ordering of matrix class configurable Jul 18, 2025
@bettinaheim
bettinaheim disabled auto-merge July 22, 2025 10:54
@bettinaheim
bettinaheim merged commit c681608 into NVIDIA:main Jul 22, 2025
github-actions Bot pushed a commit that referenced this pull request Jul 22, 2025
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Jul 22, 2025
@bettinaheim bettinaheim added this to the release 0.12.0 milestone Jul 22, 2025
atgeller pushed a commit to atgeller/cuda-quantum that referenced this pull request Jul 31, 2025
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
Signed-off-by: Bettina Heim <heimb@outlook.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Bettina Heim <heimb@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes Changes need to be captured in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants