What is a cycle of computing on a quantum computer?
1. Cooked qubits in the right quantity and the initial state we need.
2. Collected qubits in the quantum register.
3. Applied to the quantum register sequence of operations.
4. Measured the qubits that make up the quantum register. The resulting binary number, the dimension of which coincides with the dimension of the quantum register.
5. Thought over the result.
6. Repeated the cycle of calculations (items 1. through 5.), possibly many times.
7. Thought over the result.
Behind each of the points are volumes of unshakable theory. But we are programmers. How many of us know so well that there and how it turns, turns in classical processors. Yes, practically, no one. Yes, it seems to be not very necessary. Maybe here somehow. We would have a medium (IDE-shku any, or what is there?), A couple of theses ... we will tinker something, stick the "run" button, the quantum compiler (or whatever they have) will give us the syntax, we will correct it. You look, quietly go, go!
Why not try? Who will ban us in the end? Google in our hands. Look around! First, what about the assortment of quantum computers on the market? So. Clear. Deaf Work with a live piece of iron is not going to happen soon. People even express doubts about whether it will ever happen. Well, I mean, with such a normal piece of hardware, with a few hundred qubits, the size of a laptop, and you could buy inexpensively at any nearby hardware store. Yes. Not soon.
')
Well, okay. But my hands itch! But intuition and education suggest that all this quantum computing economy should be fully capable of (with some restrictions) modeling on classic computers. Let's look in this direction. This is a better situation. But, nevertheless, surprisingly few live / active projects. Very young area! But there is something. Especially for a long time to dig, and we will not pick and choose, take the first, more or less clear and more or less working. And, preferably, easier. For example,
QCadHere you go! There is a medium, there are buttons. Nifiga is not clear yet, let's figure it out. Quickly looked through the manual and the battle!
It means this: on the left in the main window - qubits.

There is a toolbox with icons of elementary transformations (gates), which we will string on horizontal rulers with risks.

By pressing the “run” button, these qubits of ours, as it were, will run from left to right and will successively run through gates (i.e. undergo appropriate transformations) and, in the end, will resort to the right edge of the window, completely transformed in accordance with our "Program" (a sequence of gates). And on the right end of the rulers (all or not all, that's how we wish), we will hang icons symbolizing the measurement process, which ends every cycle of calculations on a quantum computer. We can view the result of measurements in different types in a separate window.

Mistress on the note number 1
The measurement result of a quantum register is one binary number. And the measurement process is a probabilistic process. Those. at the output we get one of the possible (probable) values ​​of the result of the calculations. And we almost always need to evaluate the probability distribution. To estimate this sought distribution, the calculation process would have to be repeated many times. In the measurement result window (on the “Measured” tab, i.e. “Measured”), the QCAD developer immediately gives us the result in the form of the desired probability distribution for each of the possible register states. So the developer is much easier to model, and the user is much easier to analyze the result.
Mistress on the note number 2
Immediately, it may not be obvious that Qbit No. 1 is the youngest qubit of the register and in the result window in the state of the register it is in the position of the least significant bit, that is, the one on the far right.

It is very interesting, of course, how it is implemented (or, more accurately, can be implemented, potentially) in the gland, but the very first few timid and unsuccessful attempts to wade through the furious theory thoroughly cool this interest. Well, okay.
Misunderstanding number 1
Qubit is a quantum mechanical system. A qubit is therefore called (ku - BIT), because for us, programmers, it looks like it has only two basic states. And, therefore, as the first lines of the textbooks of quantum mechanics teach us, we can expect that, in general, the qubit will rather be in a superposition of basic states than in one of the “pure” basic ones. And in the simulator we see on the left (at the entrance) qubits in the states | 0> and | 1>. How so? Rush in Google, look around. Yes indeed. Quantum hardware engineers have already learned to “prepare” qubits in “clean” basic states. Well, nice.
And what is the remarkable basic condition (| 0> or | 1>)? It is remarkable that no matter how many times we apply a measurement procedure to a qubit in one of these states, we will always get a certain result (0 or 1). Measurement in quantum mechanics, as we know, is a probabilistic process, and here we will have a definite result, i.e. the probability will be equal to 1.
So, we start experiments with our simulator! Where do we start? Well, everyone says: "Quantum computing ..., quantum computing ..."! I would like to understand what kind of quantum calculations are these? You go, of course, to Google, you type: “quantum computing,” and you fall out a lot of things, but among all that falls out, you find either some kind of common words, or killer math, or killer physics. And I want to ask: where are the calculations themselves ?! But there is no one to ask. Well, now let's start with this, let's try to simulate the most common arithmetic operations with binary numbers on our quantum computer model.
Experiment number 1
We realize the operation of addition of two two-digit numbers. We use three qubits for storing the result (Q1, Q2, Q3), two qubits for the first addend (Q4, Q5), two qubits for the second addend (Q6, Q7) and some more auxiliary qubits are needed (to store the carry bit, for example, etc.).

The first thing we do is create a model template:
File -> new -> ...
In the dialog that appears

select the required number of rows (i.e. qubits) and columns (calculation cycles) and click OK.
In the opened empty window on the right, we hang the measurement icons in the right positions,

and we get a ready-made application template.
Now, using the gates available to us (elementary transformations), we must “assemble” the desired program (the addition of two two-digit binary numbers). I used for this purpose the gates of “not controlled” and “controlled not”. What they are and how they work, everyone can peep in his “Pocket Handbook for a Quantum Programmer”.
The picture below shows my implementation of the task:

It is very possible that this decision will seem monstrous to someone, but, undoubtedly, it is a solution! How to check it?
Mistress on the note number 3
If you double click on the box with the qubit state symbol.

A dialog will open:

With the help of which you can choose the initial state of each particular qubit.
Thus, setting different initial states for the qubits of operands, we will get different result values ​​after pressing the “RUN” button. And what will we have here the result and how to see it? We go in the Qubits status window to the Measured tab and find the state of the register, opposite which stands the number (the essence of the probability) 1.0.

This will be the result of our calculations!
Well, for the very first acquaintance with the topic, perhaps, that's enough. So let me leave.
Yours sincerely!