  In this paper, we provide the first efficient algorithm for port-based
teleportation, a unitarily equivariant version of teleportation useful for
constructing programmable quantum processors and performing instantaneous
nonlocal computation (NLQC). The latter connection is important in AdS/CFT,
where bulk computations are realized as boundary NLQC. Our algorithm yields an
exponential improvement to the known relationship between the amount of
entanglement available and the complexity of the nonlocal part of any unitary
that can be implemented using NLQC. Similarly, our algorithm provides the first
nontrivial efficient algorithm for an approximate universal programmable
quantum processor. The key to our approach is a generalization of Schur-Weyl
duality we call twisted Schur-Weyl duality, as well as an efficient algorithm
we develop for the twisted Schur transform, which transforms to a
subgroup-reduced irrep basis of the partially transposed permutation algebra,
whose dual is the $U^{\otimes n-k} \otimes (U^*)^{\otimes k}$ representation of
the unitary group.
