We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`cirq.plot_density_matrix` outputs buggy plots (abstract art) and doesn't scale with number of qubits. 
**Description of the issue**
`cirq.plot_density_matrix` is buggy and output's random plots (tested in a colab) and would also doesn't scale well with number of qubits. 

My guess is that this due to the magic numbers hardcoded in the code, which should be changed and computed on the fly based on the size of the density matrix. 

https://github.com/quantumlib/Cirq/blob/09a4667e3d1768fc2f1934b18ae52e5b13ecd378/cirq-core/cirq/vis/density_matrix.py#L39

**How to reproduce the issue**

```python
import cirq
cirq.plot_density_matrix(cirq.testing.random_density_matrix(dim=4, random_state = 12345))
```

<details>

![image](https://user-images.githubusercontent.com/7863287/148300842-9c302e93-1437-4e88-8513-0dcb5451186a.png)


</details>

**Cirq version**
0.14.0.dev20220105215702


cc @AnimeshSinha1309 
`cirq.plot_density_matrix` outputs buggy plots (abstract art) and doesn't scale with number of qubits. 
**Description of the issue**
`cirq.plot_density_matrix` is buggy and output's random plots (tested in a colab) and would also doesn't scale well with number of qubits. 

My guess is that this due to the magic numbers hardcoded in the code, which should be changed and computed on the fly based on the size of the density matrix. 

https://github.com/quantumlib/Cirq/blob/09a4667e3d1768fc2f1934b18ae52e5b13ecd378/cirq-core/cirq/vis/density_matrix.py#L39

**How to reproduce the issue**

```python
import cirq
cirq.plot_density_matrix(cirq.testing.random_density_matrix(dim=4, random_state = 12345))
```

<details>

![image](https://user-images.githubusercontent.com/7863287/148300842-9c302e93-1437-4e88-8513-0dcb5451186a.png)


</details>

**Cirq version**
0.14.0.dev20220105215702


cc @AnimeshSinha1309 

--- 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-core/cirq/vis/density_matrix.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 
15 """Tool to visualize the magnitudes and phases in the density matrix"""
16 
17 from typing import Optional
18 
19 import numpy as np
20 import matplotlib.pyplot as plt
21 from matplotlib import lines, patches
22 
23 from cirq.qis.states import validate_density_matrix
24 
25 
26 def _plot_element_of_density_matrix(ax, x, y, r, phase, show_rect=False, show_text=False):
27     """Plots a single element of a density matrix
28 
29     Args:
30         x: x coordinate of the cell we are plotting
31         y: y coordinate of the cell we are plotting
32         r: the amplitude of the qubit in that cell
33         phase: phase of the qubit in that cell, in radians
34         show_rect: Boolean on if to show the amplitude rectangle, used for diagonal elements
35         show_text: Boolean on if to show text labels or not
36         ax: The axes to plot on
37     """
38     # Setting up a few magic numbers for graphics
39     _half_cell_size_after_padding = (1 / 1.1) * 0.5
40     _rectangle_margin = 0.01
41     _image_opacity = 0.8 if not show_text else 0.4
42 
43     circle_out = plt.Circle(
44         (x + 0.5, y + 0.5), radius=1 / _half_cell_size_after_padding, fill=False, color='#333333'
45     )
46     circle_in = plt.Circle(
47         (x + 0.5, y + 0.5),
48         radius=r / _half_cell_size_after_padding,
49         fill=True,
50         color='IndianRed',
51         alpha=_image_opacity,
52     )
53     line = lines.Line2D(
54         (x + 0.5, x + 0.5 + np.cos(phase) / _half_cell_size_after_padding),
55         (y + 0.5, y + 0.5 + np.sin(phase) / _half_cell_size_after_padding),
56         color='#333333',
57         alpha=_image_opacity,
58     )
59     ax.add_artist(circle_in)
60     ax.add_artist(circle_out)
61     ax.add_artist(line)
62     if show_rect:
63         rect = patches.Rectangle(
64             (x + _rectangle_margin, y + _rectangle_margin),
65             1.0 - 2 * _rectangle_margin,
66             r * (1 - 2 * _rectangle_margin),
67             alpha=0.25,
68         )
69         ax.add_artist(rect)
70     if show_text:
71         plt.text(
72             x + 0.5,
73             y + 0.5,
74             f"{np.round(r, decimals=2)}\n{np.round(phase * 180 / np.pi, decimals=2)} deg",
75             horizontalalignment='center',
76             verticalalignment='center',
77         )
78 
79 
80 def plot_density_matrix(
81     matrix: np.ndarray,
82     ax: Optional[plt.Axes] = None,
83     *,
84     show_text: bool = False,
85     title: Optional[str] = None,
86 ) -> plt.Axes:
87     """Generates a plot for a given density matrix.
88 
89     1. Each entry of the density matrix, a complex number, is plotted as an
90     Argand Diagram where the partially filled red circle represents the magnitude
91     and the line represents the phase angle, going anti-clockwise from positive x - axis.
92     2. The blue rectangles on the diagonal elements represent the probability
93     of measuring the system in state $|i\rangle$.
94     Rendering scheme is inspired from https://algassert.com/quirk
95 
96     Args:
97         matrix: The density matrix to visualize
98         show_text: If true, the density matrix values are also shown as text labels
99         ax: The axes to plot on
100         title: Title of the plot
101     """
102     plt.style.use('ggplot')
103 
104     _padding_around_plot = 0.001
105 
106     matrix = matrix.astype(np.complex128)
107     num_qubits = int(np.log2(matrix.shape[0]))
108     validate_density_matrix(matrix, qid_shape=(2 ** num_qubits,))
109 
110     if ax is None:
111         _, ax = plt.subplots(figsize=(10, 10))
112     ax.set_xlim(0 - _padding_around_plot, 2 ** num_qubits + _padding_around_plot)
113     ax.set_ylim(0 - _padding_around_plot, 2 ** num_qubits + _padding_around_plot)
114 
115     for i in range(matrix.shape[0]):
116         for j in range(matrix.shape[1]):
117             _plot_element_of_density_matrix(
118                 ax,
119                 i,
120                 j,
121                 np.abs(matrix[i][-j - 1]),
122                 np.angle(matrix[i][-j - 1]),
123                 show_rect=(i == matrix.shape[1] - j - 1),
124                 show_text=show_text,
125             )
126 
127     ticks, labels = np.arange(0.5, matrix.shape[0]), [
128         f"{'0'*(num_qubits - len(f'{i:b}'))}{i:b}" for i in range(matrix.shape[0])
129     ]
130     ax.set_xticks(ticks)
131     ax.set_xticklabels(labels)
132     ax.set_yticks(ticks)
133     ax.set_yticklabels(reversed(labels))
134     ax.set_facecolor('#eeeeee')
135     if title is not None:
136         ax.set_title(title)
137     return ax
138
```
--- 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-core/cirq/vis/density_matrix.py b/cirq-core/cirq/vis/density_matrix.py
--- a/cirq-core/cirq/vis/density_matrix.py
+++ b/cirq-core/cirq/vis/density_matrix.py
@@ -41,18 +41,18 @@
     _image_opacity = 0.8 if not show_text else 0.4
 
     circle_out = plt.Circle(
-        (x + 0.5, y + 0.5), radius=1 / _half_cell_size_after_padding, fill=False, color='#333333'
+        (x + 0.5, y + 0.5), radius=1 * _half_cell_size_after_padding, fill=False, color='#333333'
     )
     circle_in = plt.Circle(
         (x + 0.5, y + 0.5),
-        radius=r / _half_cell_size_after_padding,
+        radius=r * _half_cell_size_after_padding,
         fill=True,
         color='IndianRed',
         alpha=_image_opacity,
     )
     line = lines.Line2D(
-        (x + 0.5, x + 0.5 + np.cos(phase) / _half_cell_size_after_padding),
-        (y + 0.5, y + 0.5 + np.sin(phase) / _half_cell_size_after_padding),
+        (x + 0.5, x + 0.5 + np.cos(phase) * _half_cell_size_after_padding),
+        (y + 0.5, y + 0.5 + np.sin(phase) * _half_cell_size_after_padding),
         color='#333333',
         alpha=_image_opacity,
     )
@@ -128,7 +128,7 @@
         f"{'0'*(num_qubits - len(f'{i:b}'))}{i:b}" for i in range(matrix.shape[0])
     ]
     ax.set_xticks(ticks)
-    ax.set_xticklabels(labels)
+    ax.set_xticklabels(labels, rotation=90)
     ax.set_yticks(ticks)
     ax.set_yticklabels(reversed(labels))
     ax.set_facecolor('#eeeeee')

{"golden_diff": "diff --git a/cirq-core/cirq/vis/density_matrix.py b/cirq-core/cirq/vis/density_matrix.py\n--- a/cirq-core/cirq/vis/density_matrix.py\n+++ b/cirq-core/cirq/vis/density_matrix.py\n@@ -41,18 +41,18 @@\n     _image_opacity = 0.8 if not show_text else 0.4\n \n     circle_out = plt.Circle(\n-        (x + 0.5, y + 0.5), radius=1 / _half_cell_size_after_padding, fill=False, color='#333333'\n+        (x + 0.5, y + 0.5), radius=1 * _half_cell_size_after_padding, fill=False, color='#333333'\n     )\n     circle_in = plt.Circle(\n         (x + 0.5, y + 0.5),\n-        radius=r / _half_cell_size_after_padding,\n+        radius=r * _half_cell_size_after_padding,\n         fill=True,\n         color='IndianRed',\n         alpha=_image_opacity,\n     )\n     line = lines.Line2D(\n-        (x + 0.5, x + 0.5 + np.cos(phase) / _half_cell_size_after_padding),\n-        (y + 0.5, y + 0.5 + np.sin(phase) / _half_cell_size_after_padding),\n+        (x + 0.5, x + 0.5 + np.cos(phase) * _half_cell_size_after_padding),\n+        (y + 0.5, y + 0.5 + np.sin(phase) * _half_cell_size_after_padding),\n         color='#333333',\n         alpha=_image_opacity,\n     )\n@@ -128,7 +128,7 @@\n         f\"{'0'*(num_qubits - len(f'{i:b}'))}{i:b}\" for i in range(matrix.shape[0])\n     ]\n     ax.set_xticks(ticks)\n-    ax.set_xticklabels(labels)\n+    ax.set_xticklabels(labels, rotation=90)\n     ax.set_yticks(ticks)\n     ax.set_yticklabels(reversed(labels))\n     ax.set_facecolor('#eeeeee')\n", "issue": "`cirq.plot_density_matrix` outputs buggy plots (abstract art) and doesn't scale with number of qubits. \n**Description of the issue**\r\n`cirq.plot_density_matrix` is buggy and output's random plots (tested in a colab) and would also doesn't scale well with number of qubits. \r\n\r\nMy guess is that this due to the magic numbers hardcoded in the code, which should be changed and computed on the fly based on the size of the density matrix. \r\n\r\nhttps://github.com/quantumlib/Cirq/blob/09a4667e3d1768fc2f1934b18ae52e5b13ecd378/cirq-core/cirq/vis/density_matrix.py#L39\r\n\r\n**How to reproduce the issue**\r\n\r\n```python\r\nimport cirq\r\ncirq.plot_density_matrix(cirq.testing.random_density_matrix(dim=4, random_state = 12345))\r\n```\r\n\r\n<details>\r\n\r\n![image](https://user-images.githubusercontent.com/7863287/148300842-9c302e93-1437-4e88-8513-0dcb5451186a.png)\r\n\r\n\r\n</details>\r\n\r\n**Cirq version**\r\n0.14.0.dev20220105215702\r\n\r\n\r\ncc @AnimeshSinha1309 \n`cirq.plot_density_matrix` outputs buggy plots (abstract art) and doesn't scale with number of qubits. \n**Description of the issue**\r\n`cirq.plot_density_matrix` is buggy and output's random plots (tested in a colab) and would also doesn't scale well with number of qubits. \r\n\r\nMy guess is that this due to the magic numbers hardcoded in the code, which should be changed and computed on the fly based on the size of the density matrix. \r\n\r\nhttps://github.com/quantumlib/Cirq/blob/09a4667e3d1768fc2f1934b18ae52e5b13ecd378/cirq-core/cirq/vis/density_matrix.py#L39\r\n\r\n**How to reproduce the issue**\r\n\r\n```python\r\nimport cirq\r\ncirq.plot_density_matrix(cirq.testing.random_density_matrix(dim=4, random_state = 12345))\r\n```\r\n\r\n<details>\r\n\r\n![image](https://user-images.githubusercontent.com/7863287/148300842-9c302e93-1437-4e88-8513-0dcb5451186a.png)\r\n\r\n\r\n</details>\r\n\r\n**Cirq version**\r\n0.14.0.dev20220105215702\r\n\r\n\r\ncc @AnimeshSinha1309 \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.\n\n\"\"\"Tool to visualize the magnitudes and phases in the density matrix\"\"\"\n\nfrom typing import Optional\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import lines, patches\n\nfrom cirq.qis.states import validate_density_matrix\n\n\ndef _plot_element_of_density_matrix(ax, x, y, r, phase, show_rect=False, show_text=False):\n    \"\"\"Plots a single element of a density matrix\n\n    Args:\n        x: x coordinate of the cell we are plotting\n        y: y coordinate of the cell we are plotting\n        r: the amplitude of the qubit in that cell\n        phase: phase of the qubit in that cell, in radians\n        show_rect: Boolean on if to show the amplitude rectangle, used for diagonal elements\n        show_text: Boolean on if to show text labels or not\n        ax: The axes to plot on\n    \"\"\"\n    # Setting up a few magic numbers for graphics\n    _half_cell_size_after_padding = (1 / 1.1) * 0.5\n    _rectangle_margin = 0.01\n    _image_opacity = 0.8 if not show_text else 0.4\n\n    circle_out = plt.Circle(\n        (x + 0.5, y + 0.5), radius=1 / _half_cell_size_after_padding, fill=False, color='#333333'\n    )\n    circle_in = plt.Circle(\n        (x + 0.5, y + 0.5),\n        radius=r / _half_cell_size_after_padding,\n        fill=True,\n        color='IndianRed',\n        alpha=_image_opacity,\n    )\n    line = lines.Line2D(\n        (x + 0.5, x + 0.5 + np.cos(phase) / _half_cell_size_after_padding),\n        (y + 0.5, y + 0.5 + np.sin(phase) / _half_cell_size_after_padding),\n        color='#333333',\n        alpha=_image_opacity,\n    )\n    ax.add_artist(circle_in)\n    ax.add_artist(circle_out)\n    ax.add_artist(line)\n    if show_rect:\n        rect = patches.Rectangle(\n            (x + _rectangle_margin, y + _rectangle_margin),\n            1.0 - 2 * _rectangle_margin,\n            r * (1 - 2 * _rectangle_margin),\n            alpha=0.25,\n        )\n        ax.add_artist(rect)\n    if show_text:\n        plt.text(\n            x + 0.5,\n            y + 0.5,\n            f\"{np.round(r, decimals=2)}\\n{np.round(phase * 180 / np.pi, decimals=2)} deg\",\n            horizontalalignment='center',\n            verticalalignment='center',\n        )\n\n\ndef plot_density_matrix(\n    matrix: np.ndarray,\n    ax: Optional[plt.Axes] = None,\n    *,\n    show_text: bool = False,\n    title: Optional[str] = None,\n) -> plt.Axes:\n    \"\"\"Generates a plot for a given density matrix.\n\n    1. Each entry of the density matrix, a complex number, is plotted as an\n    Argand Diagram where the partially filled red circle represents the magnitude\n    and the line represents the phase angle, going anti-clockwise from positive x - axis.\n    2. The blue rectangles on the diagonal elements represent the probability\n    of measuring the system in state $|i\\rangle$.\n    Rendering scheme is inspired from https://algassert.com/quirk\n\n    Args:\n        matrix: The density matrix to visualize\n        show_text: If true, the density matrix values are also shown as text labels\n        ax: The axes to plot on\n        title: Title of the plot\n    \"\"\"\n    plt.style.use('ggplot')\n\n    _padding_around_plot = 0.001\n\n    matrix = matrix.astype(np.complex128)\n    num_qubits = int(np.log2(matrix.shape[0]))\n    validate_density_matrix(matrix, qid_shape=(2 ** num_qubits,))\n\n    if ax is None:\n        _, ax = plt.subplots(figsize=(10, 10))\n    ax.set_xlim(0 - _padding_around_plot, 2 ** num_qubits + _padding_around_plot)\n    ax.set_ylim(0 - _padding_around_plot, 2 ** num_qubits + _padding_around_plot)\n\n    for i in range(matrix.shape[0]):\n        for j in range(matrix.shape[1]):\n            _plot_element_of_density_matrix(\n                ax,\n                i,\n                j,\n                np.abs(matrix[i][-j - 1]),\n                np.angle(matrix[i][-j - 1]),\n                show_rect=(i == matrix.shape[1] - j - 1),\n                show_text=show_text,\n            )\n\n    ticks, labels = np.arange(0.5, matrix.shape[0]), [\n        f\"{'0'*(num_qubits - len(f'{i:b}'))}{i:b}\" for i in range(matrix.shape[0])\n    ]\n    ax.set_xticks(ticks)\n    ax.set_xticklabels(labels)\n    ax.set_yticks(ticks)\n    ax.set_yticklabels(reversed(labels))\n    ax.set_facecolor('#eeeeee')\n    if title is not None:\n        ax.set_title(title)\n    return ax\n", "path": "cirq-core/cirq/vis/density_matrix.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.\n\n\"\"\"Tool to visualize the magnitudes and phases in the density matrix\"\"\"\n\nfrom typing import Optional\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import lines, patches\n\nfrom cirq.qis.states import validate_density_matrix\n\n\ndef _plot_element_of_density_matrix(ax, x, y, r, phase, show_rect=False, show_text=False):\n    \"\"\"Plots a single element of a density matrix\n\n    Args:\n        x: x coordinate of the cell we are plotting\n        y: y coordinate of the cell we are plotting\n        r: the amplitude of the qubit in that cell\n        phase: phase of the qubit in that cell, in radians\n        show_rect: Boolean on if to show the amplitude rectangle, used for diagonal elements\n        show_text: Boolean on if to show text labels or not\n        ax: The axes to plot on\n    \"\"\"\n    # Setting up a few magic numbers for graphics\n    _half_cell_size_after_padding = (1 / 1.1) * 0.5\n    _rectangle_margin = 0.01\n    _image_opacity = 0.8 if not show_text else 0.4\n\n    circle_out = plt.Circle(\n        (x + 0.5, y + 0.5), radius=1 * _half_cell_size_after_padding, fill=False, color='#333333'\n    )\n    circle_in = plt.Circle(\n        (x + 0.5, y + 0.5),\n        radius=r * _half_cell_size_after_padding,\n        fill=True,\n        color='IndianRed',\n        alpha=_image_opacity,\n    )\n    line = lines.Line2D(\n        (x + 0.5, x + 0.5 + np.cos(phase) * _half_cell_size_after_padding),\n        (y + 0.5, y + 0.5 + np.sin(phase) * _half_cell_size_after_padding),\n        color='#333333',\n        alpha=_image_opacity,\n    )\n    ax.add_artist(circle_in)\n    ax.add_artist(circle_out)\n    ax.add_artist(line)\n    if show_rect:\n        rect = patches.Rectangle(\n            (x + _rectangle_margin, y + _rectangle_margin),\n            1.0 - 2 * _rectangle_margin,\n            r * (1 - 2 * _rectangle_margin),\n            alpha=0.25,\n        )\n        ax.add_artist(rect)\n    if show_text:\n        plt.text(\n            x + 0.5,\n            y + 0.5,\n            f\"{np.round(r, decimals=2)}\\n{np.round(phase * 180 / np.pi, decimals=2)} deg\",\n            horizontalalignment='center',\n            verticalalignment='center',\n        )\n\n\ndef plot_density_matrix(\n    matrix: np.ndarray,\n    ax: Optional[plt.Axes] = None,\n    *,\n    show_text: bool = False,\n    title: Optional[str] = None,\n) -> plt.Axes:\n    \"\"\"Generates a plot for a given density matrix.\n\n    1. Each entry of the density matrix, a complex number, is plotted as an\n    Argand Diagram where the partially filled red circle represents the magnitude\n    and the line represents the phase angle, going anti-clockwise from positive x - axis.\n    2. The blue rectangles on the diagonal elements represent the probability\n    of measuring the system in state $|i\\rangle$.\n    Rendering scheme is inspired from https://algassert.com/quirk\n\n    Args:\n        matrix: The density matrix to visualize\n        show_text: If true, the density matrix values are also shown as text labels\n        ax: The axes to plot on\n        title: Title of the plot\n    \"\"\"\n    plt.style.use('ggplot')\n\n    _padding_around_plot = 0.001\n\n    matrix = matrix.astype(np.complex128)\n    num_qubits = int(np.log2(matrix.shape[0]))\n    validate_density_matrix(matrix, qid_shape=(2 ** num_qubits,))\n\n    if ax is None:\n        _, ax = plt.subplots(figsize=(10, 10))\n    ax.set_xlim(0 - _padding_around_plot, 2 ** num_qubits + _padding_around_plot)\n    ax.set_ylim(0 - _padding_around_plot, 2 ** num_qubits + _padding_around_plot)\n\n    for i in range(matrix.shape[0]):\n        for j in range(matrix.shape[1]):\n            _plot_element_of_density_matrix(\n                ax,\n                i,\n                j,\n                np.abs(matrix[i][-j - 1]),\n                np.angle(matrix[i][-j - 1]),\n                show_rect=(i == matrix.shape[1] - j - 1),\n                show_text=show_text,\n            )\n\n    ticks, labels = np.arange(0.5, matrix.shape[0]), [\n        f\"{'0'*(num_qubits - len(f'{i:b}'))}{i:b}\" for i in range(matrix.shape[0])\n    ]\n    ax.set_xticks(ticks)\n    ax.set_xticklabels(labels, rotation=90)\n    ax.set_yticks(ticks)\n    ax.set_yticklabels(reversed(labels))\n    ax.set_facecolor('#eeeeee')\n    if title is not None:\n        ax.set_title(title)\n    return ax\n", "path": "cirq-core/cirq/vis/density_matrix.py"}]}