Mathematical framework for simulation of quantum fields in complex