Repository: quantumlib/Cirq

Issue:
[cirq_web 3D circuit] X**0.5 and Y**0.5 look the same as X and Y
**Description of the issue**

The default look for `X**0.5` and `Y**0.5` look the same as `X` and `Y` in the 3D circuit.

**How to reproduce the issue**

```
import cirq_web
a, b, c, d = cirq.GridQubit.rect(2, 2)
cirq_web.Circuit3D(cirq.Circuit(cirq.X(a)**0.5, cirq.Y(b)**0.5, cirq.X(c), cirq.Y(d))).generate_html_file(
    file_name="hello.html")
```

![image](https://user-images.githubusercontent.com/635073/146627925-5158d61f-670b-41c7-a876-bfa41377fa0a.png)


**Cirq version**
You can get the cirq version by printing `cirq.__version__`. From the command line:

0.13.1



Discussion:
The problem is that the symbols on the boxes are generated entirely based on `wire_symbols`:

https://github.com/quantumlib/Cirq/blob/4ebfb1c8fa123ec6164ff8102b69858ac868840f/cirq-web/cirq_web/circuits/circuit.py#L86-L91

As a comparison, the text representation of a circuit also consider the exponent:

https://github.com/quantumlib/Cirq/blob/4ebfb1c8fa123ec6164ff8102b69858ac868840f/cirq-core/cirq/circuits/circuit.py#L2468-L2474

May I be assigned with this issue? I guess `cirq-web` can generally follow the same pattern.

Resolving patch:
diff --git a/cirq-web/cirq_web/circuits/symbols.py b/cirq-web/cirq_web/circuits/symbols.py
--- a/cirq-web/cirq_web/circuits/symbols.py
+++ b/cirq-web/cirq_web/circuits/symbols.py
@@ -18,6 +18,7 @@
 import dataclasses
 from typing import Iterable, List, Optional
 import cirq
+from cirq.protocols.circuit_diagram_info_protocol import CircuitDiagramInfoArgs
 
 
 @dataclasses.dataclass
@@ -80,11 +81,15 @@ def resolve(self, operation: cirq.Operation) -> Optional[SymbolInfo]:
             operation: the cirq.Operation object to resolve
         """
         try:
-            wire_symbols = cirq.circuit_diagram_info(operation).wire_symbols
+            info = cirq.circuit_diagram_info(operation)
         except TypeError:
             return SymbolInfo.unknown_operation(cirq.num_qubits(operation))
 
-        symbol_info = SymbolInfo(list(wire_symbols), [])
+        wire_symbols = info.wire_symbols
+        symbol_exponent = info._wire_symbols_including_formatted_exponent(
+            CircuitDiagramInfoArgs.UNINFORMED_DEFAULT
+        )
+        symbol_info = SymbolInfo(list(symbol_exponent), [])
         for symbol in wire_symbols:
             symbol_info.colors.append(DefaultResolver._SYMBOL_COLORS.get(symbol, 'gray'))
 


Test patch:
diff --git a/cirq-web/cirq_web/circuits/symbols_test.py b/cirq-web/cirq_web/circuits/symbols_test.py
--- a/cirq-web/cirq_web/circuits/symbols_test.py
+++ b/cirq-web/cirq_web/circuits/symbols_test.py
@@ -63,6 +63,20 @@ def test_resolve_operation_hadamard():
     assert symbol_info.colors == expected_colors
 
 
+def test_resolve_operation_x_pow():
+    mock_qubit = cirq.NamedQubit('mock')
+    operation = cirq.X(mock_qubit) ** 0.5
+    symbol_info = cirq_web.circuits.symbols.resolve_operation(
+        operation, cirq_web.circuits.symbols.DEFAULT_SYMBOL_RESOLVERS
+    )
+
+    expected_labels = ['X^0.5']
+    expected_colors = ['black']
+
+    assert symbol_info.labels == expected_labels
+    assert symbol_info.colors == expected_colors
+
+
 @pytest.mark.parametrize(
     'custom_gate',
     [