# Is there any way to define the Pauli matrices eigenstates symbolically in Mathematica?

I've been trying to define the kets $$|+\rangle$$ and $$|-\rangle$$ with no sucess with

<< Notation
Symbolize[ParsedBoxWrapper[Subscript["_", "_"]]]
Subscript[Ket[+], Q] := {1/Sqrt[2], 1/Sqrt[2]}

I believe that the error probably occurs because Mathematica tries to interpret the symbol + as an operation, as expected. Is there any workaround to this? P.S: I just added the Q in the subscript for aesthetic reasons, to regard it as a qubit-state

You can specify plus as a string instead, like this:

<< Notation
Symbolize[ParsedBoxWrapper[Subscript["_", "_"]]]
Subscript[Ket["+"], Q] := {1/Sqrt[2], 1/Sqrt[2]}

Subscript[Ket["+"], Q]
(* {1/Sqrt[2], 1/Sqrt[2]} *)

I found out. This can be solved quite simply if we use the notation package to define

instead of Symbolize. By doing this we can use the plus sign as a symbol inside the ket.