Once you've successfully implemented a solution or if you're stuck on a problem, you can consult the reference solution, which contains additional details on how to solve the exercise.
For this exercise, you can solve the problem by simply using Q#'s `X` operation on the input qubit, which will perform a "bit flip" and set the qubit into the $\ket{1}$ state.
@[solution]({
"id": "getting_started__flip_qubit_solution",
"codePath": "./Solution.qs"
})microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/getting_started/flip_qubit/solution.md
8lines · modepreview