Pages that link to Optimizing for an arbitrary perfect entangler. I. Functionals