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$
5
  • $\begingroup$ Thanks for the question. Could you post some code so that I could reproduce the problem? $\endgroup$ Jun 6 '19 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$ Jun 6 '19 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$ Jun 7 '19 at 7:11
  • $\begingroup$ qnodes 4 and qnodes2 just 1 execution is like : qwc = runQWC(qwc) $\endgroup$ Jun 11 '19 at 0:06
  • $\begingroup$ You measured in cnodes but the circuit includes cqnodes and cqnodes2... $\endgroup$
    – luciano
    Sep 9 '20 at 16:55

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.