Hello, @Grzegorz Górnicki !
Apologies for the late reply! The AI generated answer should have been validated and marked by the poster which has caused some delays.
Why am I getting a probability of 1 instead of 50/50 as expected?
In this case, the experiment was run for only 1 shot (shots=1
):
[ExperimentResult(shots=1, success=True, meas_level=2, data=ExperimentResultData(counts={'1': 1}, probabilities=defaultdict(<class 'int'>, {'1': 1})), header=QobjExperimentHeader(qiskit='True', name='circuit-88', num_qubits='1')))]
The expected result for a single shot would always be 100% for 0 or 1. Since the qubit is measured on a real quantum computer, it will give the distribution of the actual results. For 1 shot you would get a single result while for more shots (iterations), you would expect the distribution to be more split.
The IonQ simulator returns more idealized results so it will show a perfect distribution regardless of the number of shots.
If this has been helpful, please take a moment to accept answers as this helps increase visibility of this question for other members of the Microsoft Q&A community. If you are still running into issues, let us know in the comments. Thank you for helping to improve Microsoft Q&A!