Implement the forward diffusion process used in Denoising Diffusion Probabilistic Models (DDPMs). The forward process gradually adds Gaussian noise to data over a series of timesteps according to a variance schedule.
Given:
Write a function forward_diffusion(x_0, t, beta_start, beta_end, num_timesteps, noise) that computes the noisy sample x_t.
The function should:
The key property of the forward diffusion is that we can sample x_t directly from x_0 without iterating through all previous timesteps.
Return the noisy sample x_t as a numpy array.