Skip to content

Commit f0eec9e

Browse files
authored
Remove redundant to_normal_order after SetState in custatevecExStateVectorSetState (#1029)
Based on the 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`.
1 parent 145beff commit f0eec9e

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

lib/vectorspace_custatevecex.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,6 @@ class VectorSpaceCuStateVecEx {
546546

547547
ErrorCheck(custatevecExStateVectorSynchronize(dest.get()));
548548

549-
// TODO: do we need that?
550-
dest.to_normal_order();
551-
552549
return true;
553550
}
554551

@@ -576,9 +573,6 @@ class VectorSpaceCuStateVecEx {
576573

577574
ErrorCheck(custatevecExStateVectorSynchronize(dest.get()));
578575

579-
// TODO: do we need that?
580-
dest.to_normal_order();
581-
582576
return true;
583577
}
584578

0 commit comments

Comments
 (0)