Quantum state preparation is important for quantum information processing. In particular, in optical quantum computing with continuous variables, non-Gaussian states are needed for universal operation and error correction. Optical non-Gaussian states are usually generated by heralding schemes using photon detectors. In previous experiments, the temporal resolution of the photon detectors was sufficiently high relative to the time width of the quantum state, so that the conventional theory of non-Gaussian state preparation treated the detector's temporal resolution as negligible. However, when using various photon detectors including photon-number-resolving detectors, the temporal resolution is non-negligible. In this paper, we extend the co...