Sorry, I thought I had. But maybe its not as evident to you as it is to me.
To be in a state of grace is to be united to God. This is what happens to us when we convert and turn to God. Our first state is imperfect because we still in our sins. We have not yet been washed of our sins in Baptism. So, if we take for example, St. Paul. This is the time between when he was knocked off his horse and his Baptism.
But then, he was baptized.
Acts 22:16 And now why tarriest thou? arise, and be baptized, and wash away thy sins, calling on the name of the Lord.
His sins were washed away and he was born again a child of God. This is a perfect state of grace. Because there is no sin remaining in our soul at that time. However, he might commit sin again:
Romans 7:18 For I know that in me (that is, in my flesh,) dwelleth no good thing: for to will is present with me; but how to perform that which is good I find not. 19 For the good that I would I do not: but the evil which I would not, that I do.
So, if he succumbs to the temptation, he falls back. But if it is a venial sin, he remains in a state of grace, but imperfect.
1 John 5:16 If any man see his brother sin a sin which is not unto death, he shall ask, and he shall give him life for them that sin not unto death. …
If he should die at this point, he is in an imperfect state of grace and must go to purgatory to be perfected.
Hebrews 12:23 To the general assembly and church of the firstborn, which are written in heaven, and to God the Judge of all, and to the spirits of just men made perfect,
Now, if he goes to Confession, or to any Sacrament, his sin is removed:
1 John 1:9 If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.
But, he must still pay for the temporal effects of the sin, in purgatory. Unless, he purifies it by doing good works before he dies:
Luke 11:41 But rather give alms of such things as ye have; and, behold, all things are clean unto you.