The prohibition against ĥametz on Pesaĥ is unique in that it is not only forbidden to eat it, but it is forbidden even to keep; whoever keeps it in his home violates the two prohibitions of bal yera’eh and bal yimatzei.
The Torah’s language, “no ĥametz of yours shall be seen, and no se’or of yours shall be seen within all your borders” (Shemot 13:7), shows that there is no prohibition against a Jew having a gentile’s ĥametz or ownerless ĥametz in his domain. It says “of yours” – you are not allowed to see ĥametz that belongs to you specifically, implying that the ĥametz of gentiles and ĥametz that is ownerless are permissible.
Therefore, if a gentile lives in a Jew’s courtyard, even if the Jew owns the courtyard and the gentile works for the Jew, the Jew does not have to clear out the gentile’s ĥametz. Similarly, if a gentile deposited ĥametz in a Jew’s house for safekeeping before Pesaĥ, the Jew need not clear it out, as long as he is not responsible for the ĥametz. However, he must erect a partition at least ten tefaĥim (handbreadths) high in front of the ĥametz, to make certain that he does not forget and eat of it (SA 440:2). Alternatively, he may lock it up and hide the key, or close it in a cabinet and tape the doors shut, so that if someone should come to open them, he will be reminded of the prohibition against ĥametz.
Similarly, a Jew may let a gentile enter his home on Pesaĥ, carrying his ĥametz with him. It is forbidden, though, for the Jew to eat with the gentile at the same table, lest the Jew forget and eat of the gentile’s ĥametz. Even if he puts something on the table to remind himself not to take ĥametz from the gentile, there is still concern that a crumb of ĥametz may get mixed into the Jew’s food. However, if the gentile eats at the table first, a Jew may clean the table thoroughly of all the ĥametz crumbs and then eat matza there (SA 440:3; MB ad loc. 18).