63. Bressler, S. L. & Freeman, W. J. Frequency analysis of olfactory system EEG in cat, rabbit, and rat. *Electroencephalogr. Clin. Neurophysiol.* **50**, 19–24 (1980).

64. Gonzalez, J., Torterolo, P. & Tort, A. B. Mechanisms and functions of respiration-driven gamma oscillations in the primary olfactory cortex. *eLife* **12**, e83044 (2023).

65. Li, Q. et al. Reinstating olfactory bulb-derived limbic gamma oscillations alleviates depression-like behavioral deficits in rodents. *Neuron* **111**, 2065–2075.e5 (2023).

66. Wang, X.-J. & Buzsáki, G. Gamma oscillation by synaptic inhibition in a hippocampal interneuronal network model. *J. Neurosci.* **16**, 6402–6413 (1996).

67. Kumar, A. et al. NMDA spikes mediate amplification of inputs in the rat piriform cortex. *eLife* **7**, e38446 (2018).

68. Gill, J. V. et al. Precise holographic manipulation of olfactory circuits reveals coding features determining perceptual detection. *Neuron* **108**, 382–393.e5 (2020).

69. Wilson, D. A. & Yan, X. Sleep-like states modulate functional connectivity in the rat olfactory system. *J. Neurophysiol.* **104**, 3231–3239 (2010).

70. Murakami, M., Kashiwadani, H., Kirino, Y. & Mori, K. State-dependent sensory gating in olfactory cortex. *Neuron* **46**, 285–296 (2005).

71. Crosby, K. M., Inoue, W., Pittman, Q. J. & Bains, J. S. Endocannabinoids gate state-dependent plasticity of synaptic inhibition in feeding circuits. *Neuron* **71**, 529–541 (2011).

72. Buzsáki, G. Hippocampal sharp wave-ripple: a cognitive biomarker for episodic memory and planning. *Hippocampus* **25**, 1073–1188 (2015).

73. Busquets-Garcia, A. et al. Hippocampal CB1 receptors control incidental associations. *Neuron* **99**, 1247–1259 (2018).

74. Busquets-Garcia, A. et al. Peripheral and central CB1 cannabinoid receptors control stress-induced impairment of memory consolidation. *Proc. Natl Acad. Sci. USA* **113**, 9904–9909 (2016).

75. Grim, T. W. et al. Apparent CB₁ receptor rimonabant affinity estimates: combination with THC and synthetic cannabinoids in the mouse in vivo triad model. *J. Pharm. Exp. Ther.* **362**, 210–218 (2017).

76. Bambico, F. R. et al. Genetic deletion of fatty acid amide hydrolase alters emotional behavior and serotonergic transmission in the dorsal raphe, prefrontal cortex, and hippocampus. *Neuropsychopharmacol* **35**, 2083–2100 (2010).

77. da Fonseca Pacheco, D. et al. Central antinociception induced by opioid receptor agonist morphine. *Br. J. Pharmacol.* **158**, 225–231 (2009).

78. Soria-Gomez, E. et al. Subcellular specificity of cannabinoid effects in striatonigral circuits. *Neuron* **109**, 1513–1526.e11 (2021).

79. Hazan, L., Zugaro, M. & Buzsáki, G. Klusters, NeuroScope, NDManager: a free software suite for neurophysiological data processing and visualization. *J. Neurosci. Methods* **155**, 207–216 (2006).

80. Pachitariu, M., Steinmetz, N. A., Kadir, S. N., Carandini, M. & Harris, K. D. Fast and accurate spike sorting of high-channel count probes with KiloSort. *9*.

81. Grosmark, A. D., Mizuseki, K., Pastalkova, E., Diba, K. & Buzsáki, G. REM sleep reorganizes hippocampal excitability. *Neuron* **75**, 1001–1007 (2012).

82. Berens, P. CircStat: A MATLAB Toolbox for Circular Statistics. *J. Stat. Soft.* **31**, 1–21 (2009).

83. Grosmark, A. D. & Buzsáki, G. Diversity in neural firing dynamics supports both rigid and learned hippocampal sequences. *Science* **351**, 1440–1443 (2016).

84. Noto, T., Zhou, G., Schuele, S., Templer, J. & Zelano, C. Automated analysis of breathing waveforms using BreathMetrics: a respiratory signal processing toolbox. *Chem. Senses* **43**, 583–597 (2018).

85. Le Cam, J., Estebanez, L., Jacob, V. & Shulz, D. E. Spatial structure of multiwhisker receptive fields in the barrel cortex is stimulus dependent. *J. Neurophysiol.* **106**, 986–998 (2011).

86. Legendy, C. R. & Salcman, M. Bursts and recurrences of bursts in the spike trains of spontaneously active striate cortex neurons. *J. Neurophysiol.* **53**, 926–939 (1985).

## Acknowledgements

We thank all the staff of the Animal Facility of the Broca Institute (Pôle In Vivo) and the NeuroCentre Magendie for mouse care. The microscopy was done in the Bordeaux Imaging Center, a service unit of the CNRS-INSERM and Bordeaux University, a member of the national infrastructure France Biolmaging supported by the French National Research Agency (ANR-10-INBS-04). The help of Sébastien Marais is acknowledged. We thank the Zelano lab past and current members of the Buzsáki Lab, for making the Breathmetrics Toolbox and other scripts available. We thank GENIE project, the Janelia Farm Research Campus and James M. Wilson for sharing GCamp constructs and vectors. We are also grateful to all the members of Roux' and Marsicano's lab for useful discussions. This work was supported by CNRS (to L.R., A.N., PM L.), INSERM (to G.M.), INRAE (to G.F.), Institut Pasteur (to G.L.), Ministère de l'Enseignement Supérieur et de la Recherche (MESR to G.T.), European Research Council (MiCaBra, ERC-2017-AdG-786467 to G.M. and SociOlfa ERC-StG- 851560 to L.R.), Bordeaux University (2017 IdEx Junior Chair to L.R.), Conseil régional Nouvelle-Aquitaine (Bordeaux Neurocampus Junior Chair to L.R.), Fondation pour la Recherche Médicale and Fondation Schlumberger pour l'Education et la Recherche (FSER202112014572 to L.R. and FDT20170436845 to G.T.), French National Research Agency ("ORUPS" ANR-16-CE37-0010 to G.M., G.F., and A.N.). The Perception and Action unit is supported by Institut Pasteur, CNRS and AG2R-LaMondiale.

## Author contributions

G.T., G.M., and L.R. designed research; G.T. performed freely moving in vivo electrophysiology; G.T. and L.R. analyzed freely moving in vivo electrophysiological experiments; G.T., Y.W., D.H., and T.D. performed behavioral tasks; T.D. and L.R. performed LFP recordings with local pharmacology; G.C. adapted the scripts to analyze respiration signals; E.H. performed and analyzed head-restrained olfactometry; G.L. performed and analyzed calcium photometry; G.L., A.N., P-M.L., G.F., G.M. and L.R. supervised research; G.T. and L.R. wrote the paper. All authors edited and approved the paper.

## Competing interests

The authors declare no competing interests.

## Additional information

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s41467-024-45161-x.

**Correspondence** and requests for materials should be addressed to Lisa Roux.

**Peer review information** *Nature Communications* thanks Edi Barkai, Qi Yuan, and the other anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available.

**Reprints and permissions information** is available at http://www.nature.com/reprints

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2024
**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2024