Cannabis has a long history that stretches back millennia, but I think it is important to note that when speaking about cannabis (hemp) in an ancient context, it was not the same as what is commonly used today. It had a much, much lower THC content and was primarily used to make rope and cloth. Widespread recreational usage only really began in the Middle Ages, when groups in the Islamic world began to make and use hemp resin (we're still centuries away from the high THC varieties developed in the early 20th century).
That said, it played an important role in some religious rituals among various ancient groups, but it probably was not very widespread in Ancient Rome in particular except when it was incorporated into local traditions in areas like Thrace and Dacia.
Opium use, on the other hand, is a little easier to quantify and seems to have been much more widespread. Poppies, at least, were associated with Apollo and Asclepius, gods of healing, as well as nocturnal gods. Opium's medicinal uses, as well as poisonous properties, were well known and mentioned by Hippocrates, Pliny, and Galen. Again, this was not used recreationally (no heroin yet), since the widespread opinion in the ancient world was that opium was really more of a poison than a cure, appearing alongside hemlock and mandrake.
The Roman drugs of choice seem to have been mostly alcohol and a plant called silphium, a relative of fennel which apparently had aphrodisiac and contraceptive effects. The Romans used so much of it that it went extinct.
Hi! I know this question is a bit old, but you might be interested in this older answer of mine on the history of narcotics and recreational drug use in the Roman Empire.