QuantumKatas
QuantumKatas copied to clipboard
error message points to a wrong line number
the problem is that on line 6 the bracket is not closed but the error message tells us about line 5.
Good point! I suspect the culprit is https://github.com/microsoft/QuantumKatas/blob/852009b3ef96db0a7eed0bcc02bbe8b706452697/utilities/Microsoft.Quantum.Katas/KataMagic.cs#L98 - we're stripping the first line (the magic) from the code in the cell before compiling it, so it ends up reporting line numbers that don't match the cell line numbers.
I think it makes sense to wait with the fix until https://github.com/microsoft/QuantumKatas/pull/620 is complete, since that PR refactors the magics, but after that it should be fixable by appending an extra empty line before the rest of the code in the cell before compiling it.
Thank you for the report!
Hi @tcNickolas, I would love to work on this issue. Maybe I can take care of this is in #620 itself
@Manvi-Agrawal That will be great! Generally it's cleaner to keep unrelated changes separate, since this makes troubleshooting easier if anything breaks (allows to check which of the changes was breaking one). Let's wait until #620 is done and do the fix afterwards.
We will be migrating the Katas to the new QDK that will use a different infrastructure (see https://devblogs.microsoft.com/qsharp/introducing-the-azure-quantum-development-kit-preview/ for the announcement), so we won't continue to improve the existing infrastructure of Q# notebooks magics. Closing this issue as "won't fix".
Thanks @tcNickolas for your valuable guidance.
Looking forward to the new kata experience. Just had a look at https://quantum.microsoft.com/en-us/experience/quantum-katas, and the experience looks way more polished :-)