3
$\begingroup$

I am using Qiskit in an algorithm. In the end, I am measuring exactly a register of 4 qubits but the histograms show states with 5 qubits.

This is the code I used:

qwc = QuantumCircuit(qnodes, qnodes2, cqnodes, cqnodes2)
qwc.measure(qnodes, cnodes)
qwc.draw(output="mpl")

and finally qnodes2 is measured and represented in the plot as states qubits?

Any ideas what the problem might be?

$\endgroup$
  • $\begingroup$ Thanks for the question. Could you post some code so that I could reproduce the problem? $\endgroup$ – James Wootton Jun 6 at 14:05
  • $\begingroup$ qwc = QuantumCircuit(qnodes, qnodes2, cqnodes, cqnodes2) And then qwc.measure(qnodes, cnodes) and then qwc.draw(output="mpl") finally i get qnodes2 measured and represented in the plot as states qubits $\endgroup$ – user1319236 Jun 6 at 14:21
  • $\begingroup$ Thanks for the code. However, I'm still unsure exactly how large these registers are, and how you call execute. So I've not been able to reproduce it. $\endgroup$ – James Wootton Jun 7 at 7:11
  • $\begingroup$ qnodes 4 and qnodes2 just 1 execution is like : qwc = runQWC(qwc) $\endgroup$ – user1319236 Jun 11 at 0:06

Your Answer

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

Browse other questions tagged or ask your own question.