Specifically prohibited by the Constitution.
Article I, Section 9, Clause 3:
No Bill of Attainder or ex post facto Law shall be passed.
“A bill of attainder is an act of a legislature declaring a person, or a group of persons, guilty of some crime, and punishing them, often without a trial.
Specifically prohibited by the Constitution.
Article I, Section 9, Clause 3:
No Bill of Attainder or ex post facto Law shall be passed.”
There is a difference.
Ex post facto or after the fact means no law can be retroactively enforced.
Attainder was used in English law to punish the family of traitors if they were nobility.
A Bill of Attainder would make the descendants of a noble convicted of treason guilty of treason as well even though they did not commit treason.
The family of Anne Boleyn was charged with treason simply for being her family.
Nobles were usually not subjected to torture during criminal investigations but a bill of attainder would allow a noble and any noble related to him to be tortured for information.
Banning someone from entry to DC would be a restraining order and that could be overturned with a court order.