Is there a convention for logic gates in math mode? I see them sometimes upright and sometimes italicized. When referring to them in text [APS][1] suggest small capital letters for logical operators like AND and NOT. When dealing with other variables and non-operators it suggest italics like $\sigma$ or $x$. My problem now arises in reversibles circuits or quantum logic gates when you have operators that are matrices like X and CNOT. In quantum gates, X clearly represents a Pauli matrix that is usually italicized and CNOT represent a controlled application of X for two qubits. Certainly writting CNOT in italics seems off but then all gates should be upright or just those gates/matrices that spell a classical logic operation?
Is there any convention for this? I could not find anything right away. [1]: https://journals.aps.org/files/styleguide-pr.pdf
\DeclareMathOperator{\CNOT}{CNOT}, but\mathrm{CNOT}will do the job. I use\CNOTin math-mode to get the desired upright gate where as I would just use X in math-mode for a Pauli gate. Whatever you choose to do consistency is key so pick one way and stick to it, or better yet define a macro to allow for changes later. – Willoughby May 12 '21 at 03:15