stateRemovalSubnucs function

stateRemovalSubnucs: a fuctiong for variable state pruning.