def construct_b_matrix(self, PSI, GAMMA):
"""Construct B matrix as in D. F. V. James et al. Phys. Rev. A, 64, 052312 (2001).
:param array PSI: :math:`\psi_\\nu` vector with :math:`\\nu=1,...,16`, computed in __init__
:param array GAMMA: :math:`\Gamma` matrices, computed in __init__
:return: :math:`B_{\\nu,\mu} = \\langle \psi_\\nu \\rvert \Gamma_\mu \\lvert \psi_\\nu \\rangle`
:rtype: numpy array
"""
B = np.complex_(np.zeros((16,16)))
for i in range(16):
for j in range(16):
B[i,j] = np.dot(np.conj(PSI[i]) , np.dot(GAMMA[j], PSI[i]))
return B
评论列表
文章目录