I recently read hand-written notes about the "secret mask" or "secret string" algorithm (which I can't share here) with the following notation $\lvert \underline{x} \rangle$, i.e. a letter with a line under it. What could it mean?

  • 1
    $\begingroup$ I'm not sure the question is specific to QC. In any case: may this be just a "handwritten boldface" (perhaps to signify the vector character of x)? See for example How do you write a vector with an underline instead of an arrow? $\endgroup$ Apr 26, 2018 at 12:50
  • 2
    $\begingroup$ I suggest, to increase the chances of the question surviving, that you transcribe at least a small portion of the notes that evidences the QC context. Something that makes it more likely for this question to be found by a search of someone in the future who is indeed reading similar notes. $\endgroup$ Apr 26, 2018 at 12:59

1 Answer 1


It probably means that you take $x$ to be a binary string, $x\in\{0,1\}^n$ where you're talking about a system of $n$ qubits. The underline probably isn't necessary (it's hard to tell without more context), but just conveys that you could think of it as a vector, i.e. if $x=011010$, you could think of it as a vector $\underline{x}=(0,1,1,0,1,0)$. You don't always have to, it depends what you're going to do with it. Generally you only have to think about $x$ as a binary string. However, there are certain operations where it might help to think about it as a vector. For instance, the Hadamard transform can be written has $$ H^{\otimes n}=\frac{1}{\sqrt{2^n}}\sum_{x,z\in\{0,1\}^n}(-1)^{x\cdot z}|x\rangle\langle z|, $$ where you calculate $x\cdot z$ using the usual inner product for vectors. So, it can help to draw attention to the fact that you're using them like that by underlining them. Whether or not you do that largely depends on mood! For example, you can see that I haven't chosen to do it.

  • $\begingroup$ yes, that is correct. Standard notation reduces $|0\rangle\otimes|1\rangle\otimes|0\rangle$ to $|010\rangle$, i.e. $|x\rangle$. $\endgroup$
    – DaftWullie
    Apr 26, 2018 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.