The 2011 iMac only accepts video input via Thunderbolt. It won’t work with any other input — and the other machine must also be running macOS.
Additionally, I’m somewhat confident your adapter is the common from MiniDisplayPort to HDMI type, not the other way round (they aren't bidirectional). But even if it's the correct adapter, it won't work because the video input is not encapsulated in a Thunderbolt stream.
So, no way I'm afraid.