# Measurements in Qiskit

What is the difference between 2 types of measurements depicted below?

At the end of unitary evolution, qubits are in superposition of states, and after measurement I get a set of probabilites for different states $$(|0000\rangle...|0101\rangle...)$$ in both cases. Each set have different size: 4 for 2 qubit measurement and 16 for 4 qubit measurement. I'm confused with interpretation these results.

If I want to know, what is the probability of getting $$|0\rangle$$ or $$|1\rangle$$ on the first and second qubits, what type of meashurement should I use?

In the first circuit you only use 2 measurement gates on the first and second qubits. This means that the amount of outputs will behave similarly to a circuit that has only 2 qubits. If we were to list out all possible outputs, it would look like this: 0000, 0001, 0010, 0011. This is because the third and fourth qubits will always be 0, so you only have 2 qubits which can result in either 0 or 1. This equates to $$2^2=4$$ amount of possible outputs.
In the second circuit, you measure all 4 of the qubits. If we were to list out all possible outputs of a 4 qubit circuit, it would look like this: 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111. Since now all 4 qubits can be either 0 or 1, the amount of possible outputs you can have is $$2^4=16$$.
The measurement gates should be used on any qubit that you want to know the value of. If you do not put a measurement gate on a qubit and run the circuit, that qubit's value will always result in 0. So if you only care about the probability of getting $$|0\rangle$$ or $$|1\rangle$$ on the first two qubits, then your first circuit is fine. However, if you care about the probabilities of all 4 qubits, you would need to use your second circuit.