Yes but not because of their heterosexuality. It was usually nationality, ethnicity, religion, being "counterrevolutionary", or just because someone like lavrentiy baria didn't like you
People can be executed under Communism, though ideally the death penalty would be abolished, with rehabilitation being the focus. The state in Marxian terms is the apparatus within government by which one class oppresses others, a classless society can have a government. Marxist Communism was always envisioned as a Socialist World Republic.
This is why Anarcho-Communism and Communism are different, along with strategy.