Married, living apart, filing jointly

My spouse and I live in separate states (she lives in NC and I live in CA). It's beneficial for us to file jointly in California since she has minimal income. The ideal outcome for us is that we file jointly federally and in California, and we file separately in NC because I'm not a resident there (NC doesn't require non-resident spouses to pay income tax, as I understand it, as long as they have no NC income).

 

My spouse does come to CA with some frequency, but not enough to meet the residency requirements, and she has no income in CA. What income she has, it's fine for us to subject that to CA tax.

 

I've been able to find all sorts of information online about how to avoid being treated as a resident in California, but I haven't been able to find much information on how to ensure she is treated as a resident in CA. I think, since we're married, we can file jointly in CA as residents even though she primarily lives in NC, but I'd like to double check.