# What's the best way to design a circuit with logic gates that use the same input lines?

I am implementing a Carry Select Adder, the problem is that the circuit is quite complex to translate in Qiskit.

I need to use one (or multiple) line(s) as input for two (or more) gates.

In particular, given two Reversible Full Adder (RFA) gates both use the qubits A0 and B0, but with different carry in input. If I simply put them in series the second RFA would take as input the output of the first.

I came up with the solution of placing them in parallel by using a copy of the lines A0 and B0 for the second one but I don't like it and maybe there's a more elegant design that I can use.

Graphically, what I would like: What I came up with: • Doesn't the no-cloning theorem prevent you from doing this? Jun 20 at 5:36
• @Zeeshanahmed I am a computer scientist and new to quantum computing. I didn't know this theorem. So it seems that I cannot clone a wire like a would do with a classical circuit. But can't I just entangle the states? They should behave like a copy as far as I can understand. Jun 20 at 7:35
• Actually I came up with a better solution: since they're input qubits I can simply use a CNOT where the controlled bit is set to state 0 and the control bit is the state to "copy". So if A0' is the control bit, A0'' will be the controlled bit. It makes sense, right? Jun 20 at 7:55
• @Zeeshanahmed: Actually, you can do this for basis states. Lookup what is fan-out for details. Jun 20 at 13:39
• @MartinVesely Thank you. This solves part of the problem, because my implementation is using 28 qubits for a 4-qubit carry select adder (which, in classical computing, it uses 8 bits I suppose). I am sure I can use even less qubits, but not less that 22, because I can copy the state but not the "wire" as I would do with a classical circuit. Maybe there are some properties that I am ignoring. Jun 21 at 8:36