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$ Commented Jun 6, 2019 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$ Commented Jun 6, 2019 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$ Commented Jun 7, 2019 at 7:11
  • $\begingroup$ qnodes 4 and qnodes2 just 1 execution is like : qwc = runQWC(qwc) $\endgroup$ Commented Jun 11, 2019 at 0:06
  • $\begingroup$ You measured in cnodes but the circuit includes cqnodes and cqnodes2... $\endgroup$
    – luciano
    Commented Sep 9, 2020 at 16:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.