Inputting a circuit (versus a formula) gives the following error:
networkx.exception.NetworkXError: ('The node sets of G and H are not disjoint.', 'Use appropriate rename=(Gprefix,Hprefix)or use disjoint_union(G,H).')
It should be a error message saying the input must be a formula.