|extern MAX_UNSIGNED quantum_measure(quantum_reg reg);|
This function performs a measurement on the whole quantum register. The result of the measurement is returned.
|extern int quantum_bmeasure(int pos, quantum_reg *reg);|
In contrast to quantum_measure this function does a measurement on a single qubit. The position of the qubit is given in a notation starting with zero as the least significant bit. Note that the width of the quantum register gets reduced by one. The return value is the result of the measurement, i.e. 0 or 1.
|extern int quantum_bmeasure_bitpreserve(int pos, quantum_reg *reg);|
This version of a single qubit measurement does not decrease the width of the quantum register.