Broadly: I have noticed on the qiskit developer (assessment) exam there are many questions asking to calculate the probability after measurement however I generally have no idea how to do this without using code (for any gate).
Specifically: Given this code fragment, what is the probability that a measurement would result in $|1\rangle$ if the state is prepared with the following code:
qc = QuantumCircuit(1) qc.ry(2 * math.pi/4, 0)
I.e.: how do we answer questions like these in an exam setting using our knowledge of cosine and sine?
Note that I am referring to and broadening Sample Question 2 - IBM Quantum Developer Certification which can be seen here: https://www.youtube.com/watch?v=LBaVOE5pcaI