I remember this book from my childhood in the 70s. I believe the cover had psychedelic kids art — a magic carpet, with maybe two kids on it, very colorful. It was about two kids (I think) who (ride? are captured? somehow are on a) magic carpet that takes them to (other worlds? Other dimensions?). It was a very weird book and I completely loved it, but have no idea about the title. It definitely had some kind of interdimensional aspect (although I could be confusing this with A Wrinkle In Time, but I think not). Probably published early 70s.
Could it have been a reprint of The Phoenix and the Carpet by E. Nesbit?