# Quantum circuit error in QISKIT

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.

• I see you write simpleAlgo16 but the gate on the drawing states algo8. Is there a chance that algo8 gate actually expects 8 inputs? Dec 31 '21 at 5:04
• 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).
– V S
Jan 9 at 11:07