Expectation value calculation

To calculate the expectation value of a quantum observable for a given qubit state.