After a year, you move out of California and continue at the same job.
In year 1, you'll pay California taxes on the 1000 shares that vested at the end of that year.
What about years 2, 3 and 4? You'd guess that you wouldn't pay any California taxes on those vest events. Because you 'earnt' those shares after you left CA.
Not so fast. Because you were living in CA when those 4000 shares were granted (on a 4 year vesting schedule), you'll pay taxes on these proportions of each vesting event:
Year 1: 100% (lived in CA since grant to vest date)
Year 2: 50% (lived in CA for half the time between grant and vest)
Year 3: 33%
Year 4: 25%
So, even though you lived in CA for only 25% of the time, you pay CA tax on over 50% of your shares.