However, the harmonic minor is better for playing over a perfect cadence, where chord V7 resolves to a minor chord, as with E7-Am. The reason for this is because the E7 features a G# note ...
Harmonic minor keys are used when writing chords. There is another version of the minor key known as the melodic minor. This is used when writing a melody. Each key signature has two possible keys.