Conditional diffusion for causal inference with state space representation