Example Challenge

Example Challenge: Prepare |0⟩ or |1⟩
You need to login to be able to submit solutions!

You are given a single qubit, prepared in the |0⟩ state, and a Result with a possible Zero or One value.

Make sure to change the qubit state and leave it in a |0⟩ or |1⟩ state that corresponds with the provided Result value.

You should implement the following Solve operation to make that happen and keep the signature of the operation exactly like it is.

Go ahead and copy/paste the following template in your Q# project in Visual Studio Code to start working on the solution.

Below, you can find a possible solution and additionally, just for reference, the code that will be executed internally to validate the submitted solution.

You should only submit the Solve operation with your implemented solution, or in this example case, a copy from the provided solution below.

An unhandled error has occurred. Reload 🗙