Thank you for your kind response.The usual implementation of a precision rectifier uses an operational amplifier. For low frequencies this works fine. The problem at 1 MHz is that you need an opamp that has both gain and linearity at that frequency. I think it will be both difficult and expensive to find. I think that making a stable circuit will also be tricky.
If you could tell us more about the application it might help.
It should work for 1MHz with Schottky diodes and sufficiently fast OpAmps (such as AD8039, which has 425 V/us slew rate).Here is the textbook op-amp rectifier. I don't know if this will work to 1MHz, I would try 2 half waves and sum them.
by Jake Hertz
by Lianne Frith
by Jake Hertz