The fact that you are listed as the "custodial parent" in a child support case does NOT mean that you have sole legal custody; it only means that FOR PURPOSES OF CALCULATING SUPPORT, the court found, or assumed, that you had the child(ren) in your care and control most of the time.
You can file for divorce, and for a custody order, before you leave California, or IF THERE"s NEVER BEEN ANY CUSTODY ORDER IN CALIFORNIA can wait until you've been in the new state long enough to file a custody proceeding there. That will NEVER be less than six months, and depending on the laws of the state to which you move, may be longer; you should check with an attorney IN THAT STATE.
If your ex should file a divorce or custody case in California BEFORE that time has run, you would then probably be stuck having the custody case heard in California. You should speak both to a California attorney and to a family law attorney in the state to which you plan to move. There may be significant differences in custody laws which you need to know about to make your best decision.
Mr. Gould-Saltman's answer is excellent. I would only add that you are free to travel or move in the United States with your child as you see fit, absent a court order stating otherwise.
Sign up to receive a 3-part series of useful information and advice about child custody law.