I am writing an article in which I need a quantum circuit figure, and want to use the quantikz package for the purpose. However, I got a series of errors upon loading quantikz. I have pinpointed the problem to be of not two but three different elements, but cannot figure out how to resolve it.
There must be some type of conflict between the quantikz and cleveref packackages. Interestingly this conflict only throws errors when also using a gather-environment.
The minimal example below produces the following errors once each for every gather-environment present in the document:
- Only one # is allowed per tab.
- Misplaced alignment tab character &.
- Extra alignment tab has been changed to \cr.
\documentclass{article}
\usepackage{quantikz}
\usepackage{cleveref}
\begin{document}
\begin{gather}
some~maths
\end{gather}
\end{document}