The choice of determiner communicates the speaker's thought or attitude at that moment with respect to the noun in question.
Liquid, liquidity. Solid, solidity. Gas, __________.
Molecules in the excited state are said to have high entropy.
Paraphrase: When molecules are in the state of excitement (as opposed to a state of non-excitement, not in some other state) they are said to have high energy.
Molecules in an excited state are said to have high entropy.
Paraphrase: Either a) Excitement is a matter of degree, so we can conceive of various states or gradations of excitement: low excitement, moderate excitement, high excitement or b) There are various kinds of states: sad, happy, excited, quiet, etc. When excited to some degree [or when they are in a state of "excitement", not in some other state] molecules are said to have higher entropy.
<zero article> excited state are said to have high entropy.
Paraphrase: When excited, molecules are said to have high energy.
Water is in the liquid state above 0 degrees C.
Is in the state of liquidity, not in some other state, or not in one of the two other states.
Water is in a liquid state above 0 degrees C.
When water is liquid to a degree or not in some state other than liquid...
Water is in
<zero article> liquid state above 0 degrees C.
Water is liquid above 0 degrees C.
Water is in the gas state above 100 degrees C.
You see, we cannot come up with an abstract noun ending in -ity here. Gasity?
Water is what we refer to as "gas", not something else, or not what we call "liquid" or "solid".
Water is in a gas state above 100 degrees C.
This is marginal. Water is to some degree gaseous, or water is not in some other state.
Water is in
<zero article> gas state above 100 degrees C.
This is also marginal.
Water is gas above 100 degrees C.
Why are these marginal?
The noun gas is being used adjectivally to modify abstract noun
state. Adjectives ending in -id when modifying the noun
state yield either themselves, redundantly (liquid state => liquid) or a periphrastic abstraction "in a state of liquidity" or "in a state of solidity". The same path is not open to us when we modify
state (or similar abstract nouns, like
effect) with a noun. Gas state => Gas, "in a state of gaseousness". -eousness and -idity are not quite the same.
P.S. The zero-article forms used here would be clumsy outside scientific register. We wouldn't say "in excited state" but "excited", or "in liquid state", but "liquid". The -id suffix already indicates state or condition. The -ed participle ending does the same.