The T Gate is defined as $\begin{bmatrix} 1&0 \\ 0&e^{i\pi/4} \end{bmatrix} = \begin{bmatrix} 1&0 \\ 0&\frac{\sqrt{2}}{2}(1+i) \end{bmatrix}.$
So $\begin{bmatrix} 1&0 \\ 0&\frac{\sqrt{2}}{2}(1+i) \end{bmatrix} \vert 1 \rangle = \begin{bmatrix} 1&0 \\ 0&\frac{\sqrt{2}}{2}(1+i) \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 0 \\ \frac{\sqrt{2}}{2}(1+i) \end{bmatrix}.$
But the following code for the T Gate gives a slightly different output:
from qiskit import QuantumCircuit, Aer, execute
from qiskit_textbook.tools import array_to_latex
qc = QuantumCircuit(1)
qc.initialize([0,1],0) # initialize to |1>
qc.t(0)
display(qc.draw('mpl'))
backend = Aer.get_backend('statevector_simulator') # simulate the circuit
state = execute(qc,backend).result().get_statevector() # get final state
array_to_latex(state, pretext="\\text{Output} = ") # show final state vector
which is $\begin{bmatrix} 0 \\ \frac{1}{\sqrt{2}}(1+i) \end{bmatrix}.$
Why do these two results differ? Thanks for any insights.