What do you mean by in the same garden? What I am picturing is two hutches in a yard, one with guinea pigs and one with ferrets, is that accurate?
If that is what you are talking about, then it's not a good idea. Neither animal should even be kept outside in the first place. Guinea pigs are being exposed to predators outside, both wild and domestic. Ferrets are escape artists, which is dangerous enough indoors; if a ferret escapes outside, it is not coming back. Any animal kept outdoors is being exposed to potentially dangerous temperatures.
As I said, ferrets are escape artists and they are predators. If there is a rodent near their cage, they have more incentive to escape. Having them that near a guinea pig would definitely stress it out. Even if it did not die of fear, it would still cause stress.