People use the country = government metaphor as a shortcut for communication, but this one takes it further than usual.
This will probably never be particularly useful, but this figure of speech is a "synecdoche" (a "metonymy" instead of a "metaphor")
Saying the US did something when referring to the government is metonymy, but not synecdoche.