You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
I think that the variable "i" should be "index" in following code (control flow example).
// ...
for (qb in qubits) { // qubits contains a Qubit[]
H(qb);
}
mutable results = new (Int, Results)[Length(qubits)];
for (index in 0 .. Length(qubits) - 1) {
let measured =
set results w/= index <- (index, M(qubits[i]));
}
mutable accumulated = 0;
for ((index, measured) in results) {
if (measured == One) {
set accumulated += 1 <<< index;
}
}
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 92a89111-4a06-95d4-b6a5-304f0a6df7af
Version Independent ID: 450e9625-f516-b331-cb07-3b1f7030e663
I think that the variable "i" should be "index" in following code (control flow example).
// ...
for (qb in qubits) { // qubits contains a Qubit[]
H(qb);
}
mutable results = new (Int, Results)[Length(qubits)];
for (index in 0 .. Length(qubits) - 1) {
let measured =
set results w/= index <- (index, M(qubits[i]));
}
mutable accumulated = 0;
for ((index, measured) in results) {
if (measured == One) {
set accumulated += 1 <<< index;
}
}
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: