I'm not a tax professional, but below is the relevant section from the California Franchise Tax Board's Guideline for Determining Resident Status, which can grant nonresident status depending on the particulars of one's employment:
Safe Harbor
Safe harbor is available for certain individuals leaving
California under employment-related contracts. The safe
harbor provides that an individual domiciled in California
who is outside California under an employment-related
contract for an uninterrupted period of at least 546
consecutive days will be considered a nonresident unless
any of the following is met:
• The individual has intangible income exceeding
$200,000 in any taxable year during which the
employment-related contract is in effect.
• The principal purpose of the absence from California is
to avoid personal income tax.
The spouse/RDP of the individual covered by this safe
harbor rule will also be considered a nonresident while
accompanying the individual outside California for at least
546 consecutive days.
Return visits to California that do not exceed a total
of 45 days during any taxable year covered by the
employment contract are considered temporary.