How to generate uniform distributed samples with given auto-correlation function As I mentioned in the question title, I want to generate specific uniformly distributed samples.
I need them to model a real world scenario. For my real data, I estimated a function, which approximates the auto-correlation function by a e-function. I also modeled a distribution model for my real data.
I can generate samples, which follow my distribution model with the inverse transform sampling.
If i think correct, instead of "standard" uniform distributed samples, which i feed into the inverse transform sampling, i need to adapt those uniform distributed samples, so that their auto-correlation function follows my estimated e-function.
Now the question is, if i am correct, how to adapt my uniform distributed samples, that they correspond to my requirements.
It would be great if, somebody could help.
EDIT 1:
Here is a plot of the auto-correlation function of my real data (different scenarios) and the modeled function (green). The ACF of my uniform distributed samples should follow the green (respectively blue) line.

EDIT 2:
Thank you so much so far for the answers. To make my problem a bit clearer, i added a illustration of the problem. For a simulation, i need to generate samples, which follow my distribution model (with inverse transform sampling a easy task) AND have the same auto-correlation behavior like the real data.
My idea was, that i need to adapt the uniformly distributed samples, which i feed into the inverse transform sampling, so that their ACF follows my model.
The problem is, that i don't know if this idea is correct and that i don't know how to adapt the uniformly distributed samples.


Uniform distributed samples are the set of samples in which every element is distributed uniformly, if we place further constraints on this, it ceases to be uniform distributed samples. But anyway, if you meanе something else, we can easily upgrade my answer.
Let us just to generate samples with given autocorrelation function. Our idea is put all needed constraints on samples and let scipy.optimize to do everything for us.
While the key concept is simple, optimization and numerical problems can be arbitrary hard in real application and it can be necessary to adjust scipy solvers parameters here and/or optimize some computations.
The code implements this idea:
import numpy as np
import scipy.optimize as sco
import matplotlib.pyplot as plt

def cov(x,y):
    return np.sum(x*y)/len(x)

def cor(x,y):
    return cov(x,y)/(np.std(x)*np.std(y))

#define our autocorrelation
def autoMoment(x, moment, n):
    out = []
    for i in range(n):
        out = [moment(x,x)]
        for i in range(1,n):
            out.append(moment(x[i:],x[:-i]))
    return np.array(out)

#define generation of function for scipy.optimize
def generateWithSpecificAutomoment(moment, values): 
    def f(x):
        out = autoMoment(x, moment, len(values))
        return np.sum((np.array(out) - np.array(values))**2)
    return f

desiredAutocorr = [1,0.3,0.1,-0.23,0.03,0.07,-0.03]

initial = np.random.randn(50) #starting point for the solver
solution = sco.minimize(generateWithSpecificAutomoment(cor, desiredAutocorr), initial)

print(solution.success)
out = solution.x #samples obtained after optimization

#check autocorrelation on generated samples
realAutocorr = autoMoment(out, cor, len(desiredAutocorr))

#compare desired and real result
plt.title("Autocorrelations")
plt.plot(desiredAutocorr, linewidth=7, label="desired")
plt.plot(realAutocorr, label="real")
plt.legend()
plt.show()

Generated picture:

