MissingInputError: Input 0 (inter[t]) of the graph (indices start from 0), used to compute Elemwise{mul,no_inplace}(inter[t], beta), was not provided and not given a value. Use the PyTensor flag exception_verbosity='high', for more information on this error.
Dont put the Potential (or any PyMC named variables inside the scan). You can pass variables created before (like your beta) and use the results in model variables afterwards (like the potential). Inside you should only have operations.
So instead, call pm.Potential("pot", test) on the output of the scan.