Here's the informative link from the IRS website:
Here's the informative link from the CA Franchise Tax Board website:
If you do not already have someone very knowledgable on this handling your taxes, I can refer an EA to you. You should be aware that the Calif. Tax Law is similar to the Federal, but has some differences to consider. Good luck with doing this properly.