I found it odd that the result of the action of identity gate (namely a $2\times2$ identity matrix) on a pure state $|0\rangle$ (namely the vector corresponding to the $2\times1$ matrix $\begin{bmatrix} 1\\0 \end{bmatrix}$) becomes a $2\times2$ matrix $\begin{bmatrix} 1+0\cdot i&0+0\cdot i\\0+0\cdot i&1+0\cdot i \end{bmatrix}=\begin{bmatrix} 1&0\\0&1 \end{bmatrix}$ as I found it HERE (QISKit tutorial page):

Also, when one lets for more precision, the result gets odd:
Why is this? The same thing happens for other gates listed on the page referenced above.

job.result().get_data(circuit)returns the circuit itself, what command gives the result of the operation? – Mathist Jun 25 '18 at 02:50conda env update -f QISKitenv.ymlto upgrade it, but it didn't work for me. This worked HEREpip install -U qiskit. Just for future reference. – Mathist Jun 25 '18 at 03:26job.result().get_unitary(qc)doesn't give the result of the action of the gate on the qubit $|0\rangle$. It again gave the unitary matrix (here the identity matrix). What am I doing wrong? – Mathist Jun 25 '18 at 17:56The commands are:
– Mathist Jun 26 '18 at 17:27q = QuantumRegister(1)qc = QuantumCircuit(q)job = execute(qc, backend='local_statevector_simulator')job.result().get_data(qc)What is the reason for this?