# I.9.2.b : Measurements

**URL:** <https://discuss.pennylane.ai/t/i-9-2-b-measurements/1621>\
**Category:** Codebook\
**Created:** [January 20, 2022, 1:42pm UTC](https://discuss.pennylane.ai/t/i-9-2-b-measurements/1621 "2022-01-20T13:42:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ria](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@Ria](https://discuss.pennylane.ai/u/Ria)\
**Post date:** [January 20, 2022, 1:42pm UTC](https://discuss.pennylane.ai/t/i-9-2-b-measurements/1621/1 "2022-01-20T13:42:01Z")

</div>

Hello ! I’ve been stuck with the coding exercise I.9.2.b. for quite a while, I’m pretty sure I don’t get it right. From what I understand, I have to put the qubit in the psi state (using the prepare\_psi function), and then measure it in the y basis (I’m not really sure about this one, for me I have to use the adjoint of y\_basis\_rotation to do so). Do you have any hint ? I’m a bit lost

```
dev = qml.device("default.qubit", wires=1)
@qml.qnode(dev)
def measure_in_y_basis():
# PREPARE THE STATE
prepare_psi()
# PERFORM THE ROTATION BACK TO COMPUTATIONAL BASIS
qml.adjoint(y_basis_rotation())
# RETURN THE MEASUREMENT OUTCOME PROBABILITIES
return qml.probs(wires=0)

print(measure_in_y_basis())

```

Thanks in advance for your help

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [January 20, 2022, 7:45pm UTC](https://discuss.pennylane.ai/t/i-9-2-b-measurements/1621/2 "2022-01-20T19:45:37Z")

</div>

Hi @Ria, you’re very close!

Notice that when you use `qml.adjoint` you pass the parameters on the side.  
For instance, if you wanted to find the parameters of an X rotation you would use.

`qml.adjoint(qml.RX)(0.123, wires=0)`

What if the function takes no parameters?  
Then you can use:

`qml.adjoint(my_function_name)()`

Let me know if this helps you solve your problem!
