# targeted_tensordot¶

pyquil.numpy_simulator.targeted_tensordot(gate, wf, wf_target_inds)[source]

Left-multiplies the given axes of the wf tensor by the given gate matrix.

Compare with targeted_einsum(). The semantics of these two functions should be identical, except this uses np.tensordot instead of np.einsum.

Parameters: gate (ndarray) – What to left-multiply the target tensor by. wf (ndarray) – A tensor to carefully broadcast a left-multiply over. wf_target_inds (Sequence[int]) – Which axes of the target are being operated on. ndarray The output tensor.