View source on GitHub |
Conjugates the given tensor about the target tensor.
cirq.targeted_conjugate_about(
tensor: np.ndarray,
target: np.ndarray,
indices: Sequence[int],
conj_indices: Optional[Sequence[int]] = None,
buffer: Optional[np.ndarray] = None,
out: Optional[np.ndarray] = None
) -> np.ndarray
This method computes a target tensor conjugated by another tensor. Here conjugate is used in the sense of conjugating by a matrix, i.a. A conjugated about B is \(A B A^\dagger\) where \(\dagger\) represents the conjugate transpose.
Abstractly this compute \(A \cdot B \cdot A^\dagger\) where A and B are multi-dimensional arrays, and instead of matrix multiplication \(\cdot\) is a contraction between the given indices (indices for first \(\cdot\), conj_indices for second \(\cdot\)).
More specifically, this computes:
\[ \sum tensor_{i_0,...,i_{r-1},j_0,...,j_{r-1} } * target_{k_0,...,k_{r-1},l_0,...,l_{r-1} } * tensor_{m_0,...,m_{r-1},n_0,...,n_{r-1} }^* \]
where the sum is over indices where \(j_s\) = \(k_s\) and \(s\) is in indices
and \(l_s\) = \(m_s\) and s is in conj_indices
.
Returns | |
---|---|
The result of the conjugation, as a numpy array. |