I fractured my right hip in '09 that necessitated a hip replacement because of the location of the fracture. I was back on the trainer in 2 weeks, with clipless pedals, and back on the road in 6 weeks. Took it easy at first but as I recall it was a quick recovery. I really worked the rehab and it made a difference.
Last year I had a malunion of a pelvis fracture which involved a more complicated surgery. The location of the fracture required a revision of the hip replacement. That recovery was more difficult. I was back on the trainer in just under 6 weeks and back outdoors in about 9 weeks.
Listen to your Doc, PT and your body and you should be back at it quicker than you think.