1
$\begingroup$

I am trying to build a simple 16-qubit Quantum circuit where I am appending an 8-qubit quantum circuit to the first 8-qubits of my custom circuit. Then I measure all the qubits. However when I execute it, I get the error:

DAGCircuitError: expected 8 wires, got 16

(See attached image).

Any help on how to resolve this would be much appreciated. enter image description here

$\endgroup$
2
  • $\begingroup$ I see you write simpleAlgo16 but the gate on the drawing states algo8. Is there a chance that algo8 gate actually expects 8 inputs? $\endgroup$
    – 3yakuya
    Dec 31 '21 at 5:04
  • $\begingroup$ No, apart from the fact that it is jus a label, it is named algo8 because the output (to next stage in the computation) is just 8 qubits). $\endgroup$
    – V S
    Jan 9 at 11:07

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.