Template Function sequant::opt::detail::visit_tensor

Function Documentation

template<typename Visitor>
ExprPtr sequant::opt::detail::visit_tensor(const ExprPtr &tensor, Visitor &&visitor)

Invokes visitor on the Tensor tensor. An adjoint-marked tensor is visited in its bare (non-adjoint) form and the replacement is adjointed again.

Returns:

the replacement, or null if visitor returned null