# Quantum computing concepts

I am trying to develop a feel for quantum computing at a basic level. I would very much appreciate someone will take a look at the statement below and fix it, since I assume it needs fixing.

“Problems to be solved by a quantum computer can be programmed by creating a set of qubit input registers and connecting them to a set of output registers through an assemblage of quantum logic gates that define the problem to be solved or computation to be done. When the computation is started the qubits traverse the logic gates according to the laws of quantum mechanics, not giving the same result measurement every time, but after a sufficient number of cases have been run and measured (no trivial matter) the answer is contained in the measurements. That method, connecting the input bits to the output bits so as to provide the solution, is suitable only for trivial problems. In practice, a considerable amount of classical programming must be done to set the input qubits in such a way that the quantum machine that is configured as required for the problem can process the qubits using their quantum mechanical properties. A typical problem requires that considerable classical manipulation of the output is required also.”

Problems to be solved by a quantum computer can be programmed by creating a set of qubit input registers and connecting them to a set of output registers through an assemblage of quantum logic gates that define the problem to be solved or computation to be done.

There are always exactly as many input registers (usually just called qubits) as output registers, because quantum computers are reversible computers.

When the computation is started the qubits traverse the logic gates according to the laws of quantum mechanics, not giving the same result measurement every time, but after a sufficient number of cases have been run and measured (no trivial matter) the answer is contained in the measurements.

The qubits traversing the logic gates "according to the laws of quantum mechanics" is sort of an odd thing to say; I mean pedantically, everything everywhere happens according to the laws of quantum mechanics, but here it might be better to just say something like "the qubits are sent through the circuit and the logic gates are applied to them".

It isn't necessarily the case that quantum algorithms must be run more than once. Deterministic quantum algorithms exist which give the correct answer every time, assuming no errors.

That method, connecting the input bits to the output bits so as to provide the solution, is suitable only for trivial problems. In practice, a considerable amount of classical programming must be done to set the input qubits in such a way that the quantum machine that is configured as required for the problem can process the qubits using their quantum mechanical properties. A typical problem requires that considerable classical manipulation of the output is required also.

I don't think this is true.

You might be interested in a quantum computing video I've made aimed at computer scientists & software engineers (link) which will answer many of your questions as to the nature of quantum computation.

• Quantum computers aren’t required to be reversible. Look at measurement-based quantum computing, for example. Sep 26, 2018 at 5:29
• Gate-based quantum computing must use reversible gates. Sep 26, 2018 at 22:00
• @psitae except for the measurements, so it is not the case that the quantum computer is reversible. Usually, it's a convenient fiction to defer all the measurements to the end and think of the bulk of the computation as unitary, but there are certainly algorithms that require (or, at least, are done more easily with) measurement in the middle, such as the HHL algorithm, or syndrome measurement for error correction. Sep 27, 2018 at 7:11

Problems to be solved by a quantum computer can be programmed by creating a set of qubit input registers and connecting them to a set of output registers through an assemblage of quantum logic gates that define the problem to be solved or computation to be done.

This is certainly one way to do it, based on the quantum circuit model. There are various alternatives.

When the computation is started the qubits traverse the logic gates according to the laws of quantum mechanics, not giving the same result measurement every time, but after a sufficient number of cases have been run and measured (no trivial matter) the answer is contained in the measurements

Depending on the physical implementation, the qubits themselves may not actually move. They might, or they might sit in the same place and have the quantum gates applied to them.

If you measured the qubits in the middle of a computation, they would give different (intermediate) answers every time. But, you must not measure qubits in the middle (unless the algorithm specifically tells you to), as that destroys the quantumness of the computation.

but after a sufficient number of cases have been run and measured (no trivial matter) the answer is contained in the measurements

This is not usually the case. The key to designing good quantum algorithms is that, at the end of the computation, you get the right answer with high probability. In examples such as Grover's algorithm, the probability of error is vanishingly small. So, in practice, you only have to run the algorithm a small number of times, often only once.

In practice, a considerable amount of classical programming must be done to set the input qubits in such a way that the quantum machine that is configured as required for the problem can process the qubits using their quantum mechanical properties. A typical problem requires that considerable classical manipulation of the output is required also.

You could think about it like that, and that is certainly the way that Shor's algorithm is typically described, for example, using some classical post-processing such as the continued fractions algorithm. Perhaps a better way of thinking about it is that the entire problem could be solved on a quantum computer, specified by a single, unified, algorithm. However, because quantum computers are trickier to build and run than classical computers, if some parts of the algorithm can be performed on a classical computer, it's easier to do so, and we only run the bit that needs quantum processing on the quantum computer.

• I can visualize how a qubit traverses logic gates but I would like to have a better feel of how you apply a sequence of logic gates to a stationary qubit. Sep 26, 2018 at 23:42
• @JohnFistere It might help if you explain how you're visualising the flying qubits (as we call them) undergoing logic gates. This might be better done in a new question. Sep 27, 2018 at 7:06
• Done. Please see "Flying qubits compared with stationary qubits" Sep 27, 2018 at 8:16