Now that we have a circuit with a two-qubit quantum register and a two-qubit classical register, we can perform a measurement of all the qubits in the circuit with the measure method of the QuantumCircuit class. This method takes as input the quantum register to measure as well as the classical register in which to place the result. Here is an example:
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
circuit = QuantumCircuit(qr, cr)
circuit.h(qr[0])
circuit.cx(qr[0],qr[1])
circuit.measure(qr, cr)
Note that we can also decide to measure just an individual qubit, by specifying which qubit to measure and which bit to put the output result in the following:
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
circuit = QuantumCircuit(qr, cr)
circuit.h(qr[0])
circuit.cx(qr[0],qr[1])
circuit.measure(qr[0], cr[0])