# 矩阵的偏迹

## 定义

$\displaystyle{ H_{A,B}=H_A\otimes H_B }$

$\displaystyle{ \rho_A=Tr_B(\rho_{A,B})=\sum_{i=1}^{N_B}{\langle \omega_i |\rho_{A,B} |\omega_i \rangle} }$

## 复合空间中的向量与子空间中的向量的内积

$\displaystyle{ |X\rangle = \sum_{a,b} x_{a,b} |a\rangle \otimes |b\rangle }$

$\displaystyle{ |Y\rangle = \sum_{b} y_b |b\rangle }$

$\displaystyle{ \langle X|Y\rangle = \sum_{a,b} x*_{a,b} \langle a| \otimes \langle b| \cdot \sum_{b} y_b |b\rangle = \sum_{a,b,b'} x*_{a,b} y_{b'} \langle a| \langle b|b' \rangle }$

$\displaystyle{ \langle X|Y\rangle = \sum_{a,b} x*_{a,b} y_{b} \langle a| }$

## 复合空间中的矩阵与子空间中的向量内积

$\displaystyle{ \rho_{A,B}=\sum_{a,a',b,b'} \rho_{a,a',b,b'} (|a\rangle \langle a'|) \otimes (|b\rangle \langle b'|) =\sum_{a,a',b,b'} \rho_{a,a',b,b'} (|a\rangle \otimes |b\rangle) (\langle b' |\otimes \langle a'|) }$

$\displaystyle{ \langle|Y \rho_{A,B}|Y\rangle=(\sum_b'' y_{b''}* \langle b''|)(\sum_{a,a',b,b'} \rho_{a,a',b,b'} (|a\rangle \otimes |b\rangle) (\langle b' |\otimes \langle a'|))(\sum_b'' y_{b''} |b''\rangle)=\sum_{a,a'}\rho_{a,a',b'',b''} y_{b''}y_{b''}*|a\rangle \langle a| }$

$\displaystyle{ \sum_{b} \langle \omega_{b} | \rho_{A,B} | \omega_b \rangle=\sum_{a,a',b,b'}\rho_{a,a',b,b'} |a\rangle \langle a'| \langle b|b'\rangle }$