Partial inner product (source code)

= Partial inner product
{title2=$(\langle a|\otimes I)|\Psi\rangle$}

A <partial inner product> contracts one factor of a bipartite state against a fixed bra, leaving a <vector> in the other factor. For $|\Psi\rangle=\sum_{i,j}c_{ij}|i\rangle\otimes|j\rangle$ and $|a\rangle=\sum_i a_i|i\rangle$, the result is $\sum_{i,j}\overline{a_i}c_{ij}|j\rangle$. It is linear in $|\Psi\rangle$ and conjugate-linear in $|a\rangle$. For a normalized rank-one projective outcome on the first factor, its squared <norm> is the outcome <probability>; divide by that <norm> to obtain the conditional <pure state> when it is nonzero.