Texas vs White established unilateral secession is unconstitutional. Other states would have to support California's wish to leave the Union.
Having said that, the US is a beast very different from Spain, affording its states far more autonomy than the norm.