If either spouse is a resident and the other spouse is a nonresident, separate taxes shall be determined on their separate Virginia taxable incomes on such single or separate forms as may be required by the Department, unless both elect to determine their joint Virginia taxable income as if both were residents.
Va. Code § 58.1-326