I have a quantum circuit and the job has been run on the "statevector" backend, which runs only 1 shot.

Therefore is there a way to return the qubit state (0 or 1) specifically when selected specifically ?

  • 1
    $\begingroup$ Can you please elaborate more on what you mean by "return the qubit state (0 or 1) specifically"? For example, what would you expect to be returned for the Bell state? $\endgroup$ – Yael Ben-Haim Jan 28 at 7:22

The statevector backend returns the final state vector at the end of the circuit. If you would like to return the counts instead, the qasm_simulator should be used. This returns, in the result object, a dictionary which contains the results as keys and the number of times the result was seen as values. For example, for a circuit that constructs a Bell state, run 10 times, this could be {00: 6, 11: 4}

|improve this answer|||||

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.