Skip to content

Fix applyMultiStateControlledSqrtSwap argument list#737

Closed
D-Exposito wants to merge 4 commits intoQuEST-Kit:develfrom
D-Exposito:patch-1
Closed

Fix applyMultiStateControlledSqrtSwap argument list#737
D-Exposito wants to merge 4 commits intoQuEST-Kit:develfrom
D-Exposito:patch-1

Conversation

@D-Exposito
Copy link
Copy Markdown

Minimal change to match argument list of applyMultiStateControlledSqrtSwap on implementation and header files.

On the header file, applyMultiStateControlledSqrtSwap had an extra argument numControls which is not needed when taking std::vector<int> arguments. This difference caused compilation errors.

void applyMultiStateControlledSqrtSwap(Qureg qureg, vector<int> controls, vector<int> states, int qubit1, int qubit2) {...}
// VS
void applyMultiStateControlledSqrtSwap(Qureg qureg, vector<int> controls, vector<int> states, int numControls, int qubit1, int qubit2) { ... }

Let me know if a pull request is not the correct protocol for fixing something as small as this.

TysonRayJones and others added 4 commits May 28, 2025 03:06
Updates version references and fixes doxygen parsing of CMake configured header broken in QuEST-Kit#616
Remove numControls argument from applyMultiStateControlledSqrtSwap overloaded definition taking std::vector<int>
@otbrown otbrown changed the base branch from main to devel April 27, 2026 14:58
@otbrown
Copy link
Copy Markdown
Collaborator

otbrown commented Apr 27, 2026

Ah yes, I see the declaration doesn't match the definition at

void applyMultiStateControlledSqrtSwap(Qureg qureg, vector<int> controls, vector<int> states, int qubit1, int qubit2) {

Good catch, thanks! Assuming tests pass, I'll merge into devel as we're only a month out from a new minor release.

@otbrown
Copy link
Copy Markdown
Collaborator

otbrown commented Apr 28, 2026

Hi @D-Exposito -- in the end I've migrated your commit to a branch based on devel to make my life easier. It looks like I've managed to preserve the authorship record okay, so I'll close this one.

Your commit will now be merged in #738!

@otbrown otbrown closed this Apr 28, 2026
@TysonRayJones
Copy link
Copy Markdown
Member

Wew nice catch! @D-Exposito do you wish to be included in the QuEST patch authors list? If so, please share a name (or we can just use your account handle) to be listed e.g. here. This is a microscopic diff of course, but pixels are free!

@D-Exposito
Copy link
Copy Markdown
Author

Hi @TysonRayJones ! I feel it's quite undeserved, but it would be cool to appear if you offer. My full name is Daniel Expósito Patiño. I'll keep working with QuEST, maybe I will find other ways to contribute :)

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.

3 participants