createObjectiveFunction to support qpu_lambda ansatz
Created by: tnguyen-ornl
Related to https://github.com/ORNL-QCI/qcor/issues/134
qpu_lambdas taking double or vector can be used directly. Other qpu_lambda signatures must provide an ArgsTranslator.