  The ability to simulate one Hamiltonian with another is an important
primitive in quantum information processing. In this paper, a simulation method
for arbitrary $\sigma_z \otimes \sigma_z$ interaction based on Hadamard
matrices (quant-ph/9904100) is generalized for any pairwise interaction. We
describe two applications of the generalized framework. First, we obtain a
class of protocols for selecting an arbitrary interaction term in an n-qubit
Hamiltonian. This class includes the scheme given in quant-ph/0106064v2.
Second, we obtain a class of protocols for inverting an arbitrary, possibly
unknown n-qubit Hamiltonian, generalizing the result in quant-ph/0106085v1.
