Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently the `cirq.contrib.circuit_to_latex_using_qcircuit` utility doesn't handle exponents for multiqubit gates properly. For example, converting `cirq.ISWAP(q0, q1) ** 0.5` outputs the qcircuit source ``` \Qcircuit @r=1em @C=0.75em { \\ &\lstick{\text{0}}& \qw&\multigate{1}{\text{ISWAP}^{0.5}}^0.5 \qw&\qw\\ &\lstick{\text{1}}& \qw&\ghost{\text{ISWAP}^{0.5}}^0.5 \qw&\qw\\ \\ } ``` which produces the diagram  The `0.5` exponent is getting duplicated and put in the wrong place. This PR resolves this issue by bypassing any additional processing by `Circuit.to_text_diagram_drawer` by just hardcoding `exponent=1` into `CircuitDiagramInfo`. This results in the correct output, ``` \Qcircuit @r=1em @C=0.75em { \\ &\lstick{\text{0}}& \qw&\multigate{1}{\text{ISWAP}^{0.5}} \qw&\qw\\ &\lstick{\text{1}}& \qw&\ghost{\text{ISWAP}^{0.5}} \qw&\qw\\ \\ } ``` and the diagram 
- Loading branch information