That is definately a question for your surgeon he/she fixed you up, and only the surgeon knows the right time to wait after surgery.
Having said that there are some surgeries after which you should not return to gymnastics
. Your surgeon can guide you do not become a couch potato regardless. Do less impact exrcise often.