I was reading these lecture notes from Prof. Aaronson about Watrous's MA protocol for the group non-membership problem. At the end of the description, there's an approach to distinguish if Merlin cheated or not, to confirm that Marline sent a superposition $|H\rangle$ over the subgroup $H$. So Arthur takes whatever Merlin sends $|H'\rangle$, randomly selects $y\in H$, and computes the superposition $\sum_{h'\in H'}|h'y\rangle$ over the set $H'y$.
But the way group multiplication done is by an oracle promising that its inputs are some superpositions over group elements. What if Merlin cheated by sending a superposition of garbage encodings? In this case, we must try to get rid of the components falling into garbage encoding.
Then I realized it is not just that; if we ever want to compute a superposition over some artificial objects, it is almost inevitable to get your superposition with some components being non-sense encoding. There must (or better be) some way to sanitize the input, right?
In classical computing we usually can easily solve this. In quantum computing, it seems to be not a "big-deal" as well, but I just can't figure this out.
To make it more specific, I might define some subset $E\subseteq \{0,1\}^n$ to be the set of encodings that make sense, and $X:=\{0,1\}^n-E$ to be the set of garbage encodings. Now given a n-qubit input quantum-mechanically $|\psi\rangle\in\mathbb{C}^{\{0,1\}^n}$, $|\psi\rangle$ can always be represented as $|\psi\rangle=|e\rangle+|x\rangle$ where $|e\rangle\in\mathbb{C}^E, |x\rangle\in\mathbb{C}^X$. Is it even possible to extract $|e\rangle$ out of $|\psi\rangle$?
I tried to deterministically do the check (in each branch separately), but then we will get something like,
$$ \sum_{e\in E}c_e|e\rangle|garbage\rangle. $$
This is still not the same as
$$ |e\rangle=\sum_{e\in E}c_e|e\rangle. $$