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 ABA† where † represents the conjugate transpose.
Abstractly this compute A⋅B⋅A† where A and B are multi-dimensional arrays, and instead of matrix multiplication ⋅ is a contraction between the given indices (indices for first ⋅, conj_indices for second ⋅).
More specifically, this computes:
∑tensori0,...,ir−1,j0,...,jr−1∗targetk0,...,kr−1,l0,...,lr−1∗tensor∗m0,...,mr−1,n0,...,nr−1
where the sum is over indices where js = ks and s is in indices
and ls = ms and s is in conj_indices
.
Returns | |
---|---|
The result of the conjugation, as a numpy array. |