Use the basis state value as the key for the state labels so that their opacity values get updated correctly