2
$\begingroup$

I'm studying shor's algorithm. I implemented in Qiskit and apriori I know that a period is 3 in my example.

However, unless I know about period, how to obtain this period only according to seeing diagram?

This is a circuit diagram.

Circuit

This is a probability diagram. How to obtain a period from it?

Probabilities

$\endgroup$
2
$\begingroup$

With the most probable phase coming out of the phase estimation being 0 (the highest value in the histogram you got), you can't really do much. I suppose you got this from actual hardware, which has more tendency to relax to |0> for each qubit. This is just an artifact coming from the noise in the hardware. I suggest to you to run on noiseless simulator first, and better with more qubits (larger N in the input) so the histogram will be more significant towards the phase estimated from the quantum algorithm. Then, apply (classical) continued-fraction algorithm in the regular procedure to get the order out of the most probable phase extracted from the histogram

New contributor
Yehuda Naveh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
  • $\begingroup$ Thank you so much. You are so kind!!:) Have a nice day. $\endgroup$ – 유도경 Feb 18 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.