An inhibitory gate for state transition in cortex