0

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

Mauricio
  • 265
  • Your question is not on typesetting (although you are using LaTeX) and thereby probably off-topic here, you might want to ask that question on another site, like https://physics.stackexchange.com – DG' May 11 '21 at 21:26
  • 2
    As a general rule multi-letter symbols are always upright (mentioned in your source, page 16, second column, roman vs italic), think sin, cos, log, etc. So I would always write CNOT as upright, personally I would write the Pauli gate X italicised. In my own notes I've used \DeclareMathOperator{\CNOT}{CNOT}, but \mathrm{CNOT} will do the job. I use \CNOT in 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

0 Answers0