When does the mind become Khalsa?

When does the mind become Khalsa?