We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
cirq-web doesn't support LineQubit
```python
import cirq
import cirq_web

cirq_circuit = cirq.Circuit(cirq.H(cirq.LineQubit(0)))
cirq_web.Circuit3D(cirq_circuit).generate_html_file(
    file_name="circuit_viewer.html",
    open_in_browser=True,
)
```

results in

```
AttributeError: 'LineQubit' object has no attribute 'row'
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `cirq-web/cirq_web/circuits/circuit.py`
Content:
```
1 # Copyright 2021 The Cirq Developers
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 from typing import Iterable
15 import cirq
16 from cirq_web import widget
17 from cirq_web.circuits.symbols import (
18     Operation3DSymbol,
19     SymbolResolver,
20     resolve_operation,
21     DEFAULT_SYMBOL_RESOLVERS,
22 )
23 
24 
25 class Circuit3D(widget.Widget):
26     """Takes cirq.Circuit objects and displays them in 3D."""
27 
28     def __init__(
29         self,
30         circuit: cirq.Circuit,
31         resolvers: Iterable[SymbolResolver] = DEFAULT_SYMBOL_RESOLVERS,
32         padding_factor: float = 1,
33     ):
34         """Initializes a Circuit instance.
35 
36         Args:
37             circuit: The `cirq.Circuit` to be represented in 3D.
38             resolvers: The symbol resolve for how to show symbols in 3D.
39             padding_factor: The distance between meshes.
40         """
41         super().__init__()
42         self.circuit = circuit
43         self._resolvers = resolvers
44         self.padding_factor = padding_factor
45 
46     def get_client_code(self) -> str:
47         # Remove hyphens from the id so that we can use
48         # it as the variable name in TS.
49         # It's important that we assign the circuit to a variable
50         # for animation purposes. Alternatively, there may be ways
51         # to select/manipulate elements on the screen from three.js
52         stripped_id = self.id.replace('-', '')
53         moments = len(self.circuit.moments)
54         self.serialized_circuit = self._serialize_circuit()
55 
56         return f"""
57             <button id="camera-reset">Reset Camera</button>
58             <button id="camera-toggle">Toggle Camera Type</button>
59             <script>
60             let viz_{stripped_id} = createGridCircuit({self.serialized_circuit}, {moments}, "{self.id}", {self.padding_factor});
61 
62             document.getElementById("camera-reset").addEventListener('click', ()  => {{
63             viz_{stripped_id}.scene.setCameraAndControls(viz_{stripped_id}.circuit);
64             }});
65 
66             document.getElementById("camera-toggle").addEventListener('click', ()  => {{
67             viz_{stripped_id}.scene.toggleCamera(viz_{stripped_id}.circuit);
68             }});
69             </script>
70         """
71 
72     def get_widget_bundle_name(self) -> str:
73         return 'circuit.bundle.js'
74 
75     def _serialize_circuit(self) -> str:
76         args = []
77         moments = self.circuit.moments
78         for moment_id, moment in enumerate(moments):
79             for item in moment:
80                 symbol = self._build_3D_symbol(item, moment_id)
81                 args.append(symbol.to_typescript())
82 
83         argument_str = ','.join(str(item) for item in args)
84         return f'[{argument_str}]'
85 
86     def _build_3D_symbol(self, operation, moment) -> Operation3DSymbol:
87         symbol_info = resolve_operation(operation, self._resolvers)
88         location_info = []
89         for qubit in operation.qubits:
90             location_info.append({'row': qubit.row, 'col': qubit.col})
91         return Operation3DSymbol(symbol_info.labels, location_info, symbol_info.colors, moment)
92
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/cirq-web/cirq_web/circuits/circuit.py b/cirq-web/cirq_web/circuits/circuit.py
--- a/cirq-web/cirq_web/circuits/circuit.py
+++ b/cirq-web/cirq_web/circuits/circuit.py
@@ -87,5 +87,10 @@
         symbol_info = resolve_operation(operation, self._resolvers)
         location_info = []
         for qubit in operation.qubits:
-            location_info.append({'row': qubit.row, 'col': qubit.col})
+            if isinstance(qubit, cirq.GridQubit):
+                location_info.append({'row': qubit.row, 'col': qubit.col})
+            elif isinstance(qubit, cirq.LineQubit):
+                location_info.append({'row': qubit.x, 'col': 0})
+            else:
+                raise ValueError('Unsupported qubit type')
         return Operation3DSymbol(symbol_info.labels, location_info, symbol_info.colors, moment)

{"golden_diff": "diff --git a/cirq-web/cirq_web/circuits/circuit.py b/cirq-web/cirq_web/circuits/circuit.py\n--- a/cirq-web/cirq_web/circuits/circuit.py\n+++ b/cirq-web/cirq_web/circuits/circuit.py\n@@ -87,5 +87,10 @@\n         symbol_info = resolve_operation(operation, self._resolvers)\n         location_info = []\n         for qubit in operation.qubits:\n-            location_info.append({'row': qubit.row, 'col': qubit.col})\n+            if isinstance(qubit, cirq.GridQubit):\n+                location_info.append({'row': qubit.row, 'col': qubit.col})\n+            elif isinstance(qubit, cirq.LineQubit):\n+                location_info.append({'row': qubit.x, 'col': 0})\n+            else:\n+                raise ValueError('Unsupported qubit type')\n         return Operation3DSymbol(symbol_info.labels, location_info, symbol_info.colors, moment)\n", "issue": "cirq-web doesn't support LineQubit\n```python\r\nimport cirq\r\nimport cirq_web\r\n\r\ncirq_circuit = cirq.Circuit(cirq.H(cirq.LineQubit(0)))\r\ncirq_web.Circuit3D(cirq_circuit).generate_html_file(\r\n    file_name=\"circuit_viewer.html\",\r\n    open_in_browser=True,\r\n)\r\n```\r\n\r\nresults in\r\n\r\n```\r\nAttributeError: 'LineQubit' object has no attribute 'row'\r\n```\n", "before_files": [{"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nfrom typing import Iterable\nimport cirq\nfrom cirq_web import widget\nfrom cirq_web.circuits.symbols import (\n    Operation3DSymbol,\n    SymbolResolver,\n    resolve_operation,\n    DEFAULT_SYMBOL_RESOLVERS,\n)\n\n\nclass Circuit3D(widget.Widget):\n    \"\"\"Takes cirq.Circuit objects and displays them in 3D.\"\"\"\n\n    def __init__(\n        self,\n        circuit: cirq.Circuit,\n        resolvers: Iterable[SymbolResolver] = DEFAULT_SYMBOL_RESOLVERS,\n        padding_factor: float = 1,\n    ):\n        \"\"\"Initializes a Circuit instance.\n\n        Args:\n            circuit: The `cirq.Circuit` to be represented in 3D.\n            resolvers: The symbol resolve for how to show symbols in 3D.\n            padding_factor: The distance between meshes.\n        \"\"\"\n        super().__init__()\n        self.circuit = circuit\n        self._resolvers = resolvers\n        self.padding_factor = padding_factor\n\n    def get_client_code(self) -> str:\n        # Remove hyphens from the id so that we can use\n        # it as the variable name in TS.\n        # It's important that we assign the circuit to a variable\n        # for animation purposes. Alternatively, there may be ways\n        # to select/manipulate elements on the screen from three.js\n        stripped_id = self.id.replace('-', '')\n        moments = len(self.circuit.moments)\n        self.serialized_circuit = self._serialize_circuit()\n\n        return f\"\"\"\n            <button id=\"camera-reset\">Reset Camera</button>\n            <button id=\"camera-toggle\">Toggle Camera Type</button>\n            <script>\n            let viz_{stripped_id} = createGridCircuit({self.serialized_circuit}, {moments}, \"{self.id}\", {self.padding_factor});\n\n            document.getElementById(\"camera-reset\").addEventListener('click', ()  => {{\n            viz_{stripped_id}.scene.setCameraAndControls(viz_{stripped_id}.circuit);\n            }});\n\n            document.getElementById(\"camera-toggle\").addEventListener('click', ()  => {{\n            viz_{stripped_id}.scene.toggleCamera(viz_{stripped_id}.circuit);\n            }});\n            </script>\n        \"\"\"\n\n    def get_widget_bundle_name(self) -> str:\n        return 'circuit.bundle.js'\n\n    def _serialize_circuit(self) -> str:\n        args = []\n        moments = self.circuit.moments\n        for moment_id, moment in enumerate(moments):\n            for item in moment:\n                symbol = self._build_3D_symbol(item, moment_id)\n                args.append(symbol.to_typescript())\n\n        argument_str = ','.join(str(item) for item in args)\n        return f'[{argument_str}]'\n\n    def _build_3D_symbol(self, operation, moment) -> Operation3DSymbol:\n        symbol_info = resolve_operation(operation, self._resolvers)\n        location_info = []\n        for qubit in operation.qubits:\n            location_info.append({'row': qubit.row, 'col': qubit.col})\n        return Operation3DSymbol(symbol_info.labels, location_info, symbol_info.colors, moment)\n", "path": "cirq-web/cirq_web/circuits/circuit.py"}], "after_files": [{"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nfrom typing import Iterable\nimport cirq\nfrom cirq_web import widget\nfrom cirq_web.circuits.symbols import (\n    Operation3DSymbol,\n    SymbolResolver,\n    resolve_operation,\n    DEFAULT_SYMBOL_RESOLVERS,\n)\n\n\nclass Circuit3D(widget.Widget):\n    \"\"\"Takes cirq.Circuit objects and displays them in 3D.\"\"\"\n\n    def __init__(\n        self,\n        circuit: cirq.Circuit,\n        resolvers: Iterable[SymbolResolver] = DEFAULT_SYMBOL_RESOLVERS,\n        padding_factor: float = 1,\n    ):\n        \"\"\"Initializes a Circuit instance.\n\n        Args:\n            circuit: The `cirq.Circuit` to be represented in 3D.\n            resolvers: The symbol resolve for how to show symbols in 3D.\n            padding_factor: The distance between meshes.\n        \"\"\"\n        super().__init__()\n        self.circuit = circuit\n        self._resolvers = resolvers\n        self.padding_factor = padding_factor\n\n    def get_client_code(self) -> str:\n        # Remove hyphens from the id so that we can use\n        # it as the variable name in TS.\n        # It's important that we assign the circuit to a variable\n        # for animation purposes. Alternatively, there may be ways\n        # to select/manipulate elements on the screen from three.js\n        stripped_id = self.id.replace('-', '')\n        moments = len(self.circuit.moments)\n        self.serialized_circuit = self._serialize_circuit()\n\n        return f\"\"\"\n            <button id=\"camera-reset\">Reset Camera</button>\n            <button id=\"camera-toggle\">Toggle Camera Type</button>\n            <script>\n            let viz_{stripped_id} = createGridCircuit({self.serialized_circuit}, {moments}, \"{self.id}\", {self.padding_factor});\n\n            document.getElementById(\"camera-reset\").addEventListener('click', ()  => {{\n            viz_{stripped_id}.scene.setCameraAndControls(viz_{stripped_id}.circuit);\n            }});\n\n            document.getElementById(\"camera-toggle\").addEventListener('click', ()  => {{\n            viz_{stripped_id}.scene.toggleCamera(viz_{stripped_id}.circuit);\n            }});\n            </script>\n        \"\"\"\n\n    def get_widget_bundle_name(self) -> str:\n        return 'circuit.bundle.js'\n\n    def _serialize_circuit(self) -> str:\n        args = []\n        moments = self.circuit.moments\n        for moment_id, moment in enumerate(moments):\n            for item in moment:\n                symbol = self._build_3D_symbol(item, moment_id)\n                args.append(symbol.to_typescript())\n\n        argument_str = ','.join(str(item) for item in args)\n        return f'[{argument_str}]'\n\n    def _build_3D_symbol(self, operation, moment) -> Operation3DSymbol:\n        symbol_info = resolve_operation(operation, self._resolvers)\n        location_info = []\n        for qubit in operation.qubits:\n            if isinstance(qubit, cirq.GridQubit):\n                location_info.append({'row': qubit.row, 'col': qubit.col})\n            elif isinstance(qubit, cirq.LineQubit):\n                location_info.append({'row': qubit.x, 'col': 0})\n            else:\n                raise ValueError('Unsupported qubit type')\n        return Operation3DSymbol(symbol_info.labels, location_info, symbol_info.colors, moment)\n", "path": "cirq-web/cirq_web/circuits/circuit.py"}]}