rabi.cpp (modified get_initial_param)