  Efficient quantum Monte Carlo update schemes called directed loops have
recently been proposed, which improve the efficiency of simulations of quantum
lattice models. We propose to generalize the detailed balance equations at the
local level during the loop construction by accounting for the matrix elements
of the operators associated with open world-line segments. Using linear
programming techniques to solve the generalized equations, we look for optimal
construction schemes for directed loops. This also allows for an extension of
the directed loop scheme to general lattice models, such as high-spin or
bosonic models. The resulting algorithms are bounce-free in larger regions of
parameter space than the original directed loop algorithm. The generalized
directed loop method is applied to the magnetization process of spin chains in
order to compare its efficiency to that of previous directed loop schemes. In
contrast to general expectations, we find that minimizing bounces alone does
not always lead to more efficient algorithms in terms of autocorrelations of
physical observables, because of the non-uniqueness of the bounce-free
solutions. We therefore propose different general strategies to further
minimize autocorrelations, which can be used as supplementary requirements in
any directed loop scheme. We show by calculating autocorrelation times for
different observables that such strategies indeed lead to improved efficiency;
however we find that the optimal strategy depends not only on the model
parameters but also on the observable of interest.
