Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Fully qualified name: Std.Diagnostics.CheckZero
operation CheckZero(qubit : Qubit) : Bool
Summary
Checks whether a qubit is in the |0⟩ state, returning true if it is.
Description
This operation checks whether a qubit is in the |0⟩ state. It will return true only if the qubit is deterministically in the |0⟩ state, and will return false otherwise. This operation does not change the state of the qubit.
Input
qubit
The qubit to check.
Output
True if the qubit is in the |0⟩ state, false otherwise.
Remarks
This operation is useful for checking whether a qubit is in the |0⟩ state during simulation. It is not possible to check this on hardware without measuring the qubit, which could change the state.