Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for TODO in SwapFullRegisters #48

Open
msoeken opened this issue Oct 25, 2020 · 0 comments
Open

Suggestion for TODO in SwapFullRegisters #48

msoeken opened this issue Oct 25, 2020 · 0 comments

Comments

@msoeken
Copy link
Contributor

msoeken commented Oct 25, 2020

qram/src/Common.qs

Lines 246 to 249 in b306747

// TODO: find a way to do this in one line with ApplyToEach
for (qubitIndex in RangeAsIntArray(0..Length(registerA)-1)) {
SWAP(registerA[qubitIndex], registerB[qubitIndex]);
}

This could be replaced by:

ApplyToEachCA(SWAP, Zipped(registerA, registerB));
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

No branches or pull requests

1 participant