microsoft / qsharp

Azure Quantum Development Kit, including the Q# programming language, resource estimator, and Quantum Katas
https://microsoft.github.io/qsharp/
MIT License
367 stars 73 forks source link

Use BoolArrayAsKetState to print help messages in CheckOracleImplementsFunction #1639

Open tcNickolas opened 2 weeks ago

tcNickolas commented 2 weeks ago

Currently CheckOracleImplementsFunction operation used to check that the marking oracle implements the given function prints states on which oracle behaves incorrectly as Boolean arrays. This is fine but a bit lengthy, especially if the inputs have 4 or more (qu)bits.

Migration of Measurements kata brought in a function that can help with that, BoolArrayAsKetState. We can move this function to KatasLibrary.qs and use it when printing "unexpected result" message.

ggridin commented 1 day ago

@tcNickolas I'd like to work on this issue.

tcNickolas commented 15 hours ago

Sounds great!

ggridin commented 13 hours ago

@tcNickolas It might make sense to move another helper function IntArrayAsStateName to KatasLibrary.qs At this case, Common.qs won't have dependency on KatasLibrary