2-mode Grover's search algorithm

I’m trying to start with 2-mode Grover’s search algorithm — perceval 0.7.3 documentation, and the second code block is generating the error “ValueError: invalid fock state representation (bad close)”. I’m just copying-and-pasting at this point; I haven’t modified anything.

Python 3.9.13 on Windows