Skip to content

Remove redundant to_normal_order after SetState in custatevecExStateVectorSetState#1029

Open
mhucka wants to merge 1 commit intoquantumlib:mainfrom
mhucka:fix-redundant-to-normal-order-in-copy-custatevecex-17350625667726609425
Open

Remove redundant to_normal_order after SetState in custatevecExStateVectorSetState#1029
mhucka wants to merge 1 commit intoquantumlib:mainfrom
mhucka:fix-redundant-to-normal-order-in-copy-custatevecex-17350625667726609425

Conversation

@mhucka
Copy link
Copy Markdown
Collaborator

@mhucka mhucka commented Mar 27, 2026

Based on cuStateVecEx documentation, custatevecExStateVectorSetState respects the current wire ordering of the state vector. Therefore, calling to_normal_order() to physically rearrange the state is not logically required after initialization from a host buffer, and it might even be undesirable if the caller intends to keep a specific permutation for performance.

Removed the to_normal_order() calls and associated TODO comments from both Copy overloads in lib/vectorspace_custatevecex.h.

…StateVecEx::Copy`.

Based on cuStateVecEx documentation, `custatevecExStateVectorSetState`
respects the current wire ordering of the state vector. Therefore, calling
`to_normal_order()` to physically rearrange the state is not logically
required after initialization from a host buffer, and it might even be
undesirable if the caller intends to keep a specific permutation for performance.

Removed the `to_normal_order()` calls and associated TODO comments from both
`Copy` overloads in `lib/vectorspace_custatevecex.h`.
@github-actions github-actions bot added the Size: XS <10 lines changed label Mar 27, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes redundant calls to to_normal_order() and associated TODO comments in lib/vectorspace_custatevecex.h following state vector synchronization. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: XS <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant