Create measurement function in QubitContainer