We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typos in wait_gate.py::wait
https://github.com/quantumlib/Cirq/blob/150f95c31042669ab9905654998a8432844a4209/cirq/ops/wait_gate.py#L140-L143

They all say picoseconds, but should say picos, nanos, micros, millis.


--- 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/ops/wait_gate.py`
Content:
```
1 # Copyright 2019 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 AbstractSet, Any, Dict, Optional, Tuple, TYPE_CHECKING, Union
15 
16 import sympy
17 
18 from cirq import value, protocols
19 from cirq.ops import raw_types
20 
21 if TYPE_CHECKING:
22     import cirq
23 
24 
25 @value.value_equality
26 class WaitGate(raw_types.Gate):
27     """A single-qubit idle gate that represents waiting.
28 
29     In non-noisy simulators, this gate is just an identity gate. But noisy
30     simulators and noise models may insert more error for longer waits.
31     """
32 
33     def __init__(
34         self,
35         duration: 'cirq.DURATION_LIKE',
36         num_qubits: Optional[int] = None,
37         qid_shape: Tuple[int, ...] = None,
38     ) -> None:
39         """Initialize a wait gate with the given duration.
40 
41         Args:
42             duration: A constant or parameterized wait duration. This can be
43                 an instance of `datetime.timedelta` or `cirq.Duration`.
44         """
45         self.duration = value.Duration(duration)
46         if not protocols.is_parameterized(self.duration) and self.duration < 0:
47             raise ValueError('duration < 0')
48         if qid_shape is None:
49             if num_qubits is None:
50                 # Assume one qubit for backwards compatibility
51                 qid_shape = (2,)
52             else:
53                 qid_shape = (2,) * num_qubits
54         if num_qubits is None:
55             num_qubits = len(qid_shape)
56         if not qid_shape:
57             raise ValueError('Waiting on an empty set of qubits.')
58         if num_qubits != len(qid_shape):
59             raise ValueError('len(qid_shape) != num_qubits')
60         self._qid_shape = qid_shape
61 
62     def _is_parameterized_(self) -> bool:
63         return protocols.is_parameterized(self.duration)
64 
65     def _parameter_names_(self) -> AbstractSet[str]:
66         return protocols.parameter_names(self.duration)
67 
68     def _resolve_parameters_(self, resolver: 'cirq.ParamResolver', recursive: bool) -> 'WaitGate':
69         return WaitGate(protocols.resolve_parameters(self.duration, resolver, recursive))
70 
71     def _qid_shape_(self) -> Tuple[int, ...]:
72         return self._qid_shape
73 
74     def _has_unitary_(self) -> bool:
75         return True
76 
77     def _apply_unitary_(self, args):
78         return args.target_tensor  # Identity.
79 
80     def _decompose_(self, qubits):
81         return []
82 
83     def _trace_distance_bound_(self):
84         return 0
85 
86     def __pow__(self, power):
87         if power == 1 or power == -1:
88             # The inverse of a wait is still a wait.
89             return self
90         # Other scalar exponents could scale the wait... but ultimately it is
91         # ambiguous whether the user wanted to scale the duration or just wanted
92         # to affect the unitary. Play it safe and fail.
93         return NotImplemented
94 
95     def __str__(self) -> str:
96         return f'WaitGate({self.duration})'
97 
98     def __repr__(self) -> str:
99         return f'cirq.WaitGate({repr(self.duration)})'
100 
101     def _json_dict_(self) -> Dict[str, Any]:
102         d = protocols.obj_to_dict_helper(self, ['duration'])
103         if len(self._qid_shape) != 1:
104             d['num_qubits'] = len(self._qid_shape)
105         if any(d != 2 for d in self._qid_shape):
106             d['qid_shape'] = self._qid_shape
107         return d
108 
109     @classmethod
110     def _from_json_dict_(cls, duration, num_qubits=None, qid_shape=None, **kwargs):
111         return cls(
112             duration=duration,
113             num_qubits=num_qubits,
114             qid_shape=None if qid_shape is None else tuple(qid_shape),
115         )
116 
117     def _value_equality_values_(self) -> Any:
118         return self.duration
119 
120     def _quil_(self, qubits: Tuple['cirq.Qid', ...], formatter: 'cirq.QuilFormatter'):
121         return 'WAIT\n'
122 
123 
124 def wait(
125     *target: 'cirq.Qid',
126     duration: 'cirq.DURATION_LIKE' = None,
127     picos: Union[int, float, sympy.Basic] = 0,
128     nanos: Union[int, float, sympy.Basic] = 0,
129     micros: Union[int, float, sympy.Basic] = 0,
130     millis: Union[int, float, sympy.Basic] = 0,
131 ) -> raw_types.Operation:
132     """Creates a WaitGate applied to all the given qubits.
133 
134     The duration can be specified as a DURATION_LIKE or using keyword args with
135     numbers in the appropriate units. See Duration for details.
136 
137     Args:
138         *target: The qubits that should wait.
139         value: Wait duration (see Duration).
140         picos: Picoseconds to wait (see Duration).
141         nanos: Picoseconds to wait (see Duration).
142         micros: Picoseconds to wait (see Duration).
143         millis: Picoseconds to wait (see Duration).
144     """
145     return WaitGate(
146         duration=value.Duration(
147             duration,
148             picos=picos,
149             nanos=nanos,
150             micros=micros,
151             millis=millis,
152         ),
153         qid_shape=protocols.qid_shape(target),
154     ).on(*target)
155
```
--- 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/ops/wait_gate.py b/cirq/ops/wait_gate.py
--- a/cirq/ops/wait_gate.py
+++ b/cirq/ops/wait_gate.py
@@ -138,9 +138,9 @@
         *target: The qubits that should wait.
         value: Wait duration (see Duration).
         picos: Picoseconds to wait (see Duration).
-        nanos: Picoseconds to wait (see Duration).
-        micros: Picoseconds to wait (see Duration).
-        millis: Picoseconds to wait (see Duration).
+        nanos: Nanoseconds to wait (see Duration).
+        micros: Microseconds to wait (see Duration).
+        millis: Milliseconds to wait (see Duration).
     """
     return WaitGate(
         duration=value.Duration(

{"golden_diff": "diff --git a/cirq/ops/wait_gate.py b/cirq/ops/wait_gate.py\n--- a/cirq/ops/wait_gate.py\n+++ b/cirq/ops/wait_gate.py\n@@ -138,9 +138,9 @@\n         *target: The qubits that should wait.\n         value: Wait duration (see Duration).\n         picos: Picoseconds to wait (see Duration).\n-        nanos: Picoseconds to wait (see Duration).\n-        micros: Picoseconds to wait (see Duration).\n-        millis: Picoseconds to wait (see Duration).\n+        nanos: Nanoseconds to wait (see Duration).\n+        micros: Microseconds to wait (see Duration).\n+        millis: Milliseconds to wait (see Duration).\n     \"\"\"\n     return WaitGate(\n         duration=value.Duration(\n", "issue": "Typos in wait_gate.py::wait\nhttps://github.com/quantumlib/Cirq/blob/150f95c31042669ab9905654998a8432844a4209/cirq/ops/wait_gate.py#L140-L143\r\n\r\nThey all say picoseconds, but should say picos, nanos, micros, millis.\r\n\n", "before_files": [{"content": "# Copyright 2019 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 AbstractSet, Any, Dict, Optional, Tuple, TYPE_CHECKING, Union\n\nimport sympy\n\nfrom cirq import value, protocols\nfrom cirq.ops import raw_types\n\nif TYPE_CHECKING:\n    import cirq\n\n\n@value.value_equality\nclass WaitGate(raw_types.Gate):\n    \"\"\"A single-qubit idle gate that represents waiting.\n\n    In non-noisy simulators, this gate is just an identity gate. But noisy\n    simulators and noise models may insert more error for longer waits.\n    \"\"\"\n\n    def __init__(\n        self,\n        duration: 'cirq.DURATION_LIKE',\n        num_qubits: Optional[int] = None,\n        qid_shape: Tuple[int, ...] = None,\n    ) -> None:\n        \"\"\"Initialize a wait gate with the given duration.\n\n        Args:\n            duration: A constant or parameterized wait duration. This can be\n                an instance of `datetime.timedelta` or `cirq.Duration`.\n        \"\"\"\n        self.duration = value.Duration(duration)\n        if not protocols.is_parameterized(self.duration) and self.duration < 0:\n            raise ValueError('duration < 0')\n        if qid_shape is None:\n            if num_qubits is None:\n                # Assume one qubit for backwards compatibility\n                qid_shape = (2,)\n            else:\n                qid_shape = (2,) * num_qubits\n        if num_qubits is None:\n            num_qubits = len(qid_shape)\n        if not qid_shape:\n            raise ValueError('Waiting on an empty set of qubits.')\n        if num_qubits != len(qid_shape):\n            raise ValueError('len(qid_shape) != num_qubits')\n        self._qid_shape = qid_shape\n\n    def _is_parameterized_(self) -> bool:\n        return protocols.is_parameterized(self.duration)\n\n    def _parameter_names_(self) -> AbstractSet[str]:\n        return protocols.parameter_names(self.duration)\n\n    def _resolve_parameters_(self, resolver: 'cirq.ParamResolver', recursive: bool) -> 'WaitGate':\n        return WaitGate(protocols.resolve_parameters(self.duration, resolver, recursive))\n\n    def _qid_shape_(self) -> Tuple[int, ...]:\n        return self._qid_shape\n\n    def _has_unitary_(self) -> bool:\n        return True\n\n    def _apply_unitary_(self, args):\n        return args.target_tensor  # Identity.\n\n    def _decompose_(self, qubits):\n        return []\n\n    def _trace_distance_bound_(self):\n        return 0\n\n    def __pow__(self, power):\n        if power == 1 or power == -1:\n            # The inverse of a wait is still a wait.\n            return self\n        # Other scalar exponents could scale the wait... but ultimately it is\n        # ambiguous whether the user wanted to scale the duration or just wanted\n        # to affect the unitary. Play it safe and fail.\n        return NotImplemented\n\n    def __str__(self) -> str:\n        return f'WaitGate({self.duration})'\n\n    def __repr__(self) -> str:\n        return f'cirq.WaitGate({repr(self.duration)})'\n\n    def _json_dict_(self) -> Dict[str, Any]:\n        d = protocols.obj_to_dict_helper(self, ['duration'])\n        if len(self._qid_shape) != 1:\n            d['num_qubits'] = len(self._qid_shape)\n        if any(d != 2 for d in self._qid_shape):\n            d['qid_shape'] = self._qid_shape\n        return d\n\n    @classmethod\n    def _from_json_dict_(cls, duration, num_qubits=None, qid_shape=None, **kwargs):\n        return cls(\n            duration=duration,\n            num_qubits=num_qubits,\n            qid_shape=None if qid_shape is None else tuple(qid_shape),\n        )\n\n    def _value_equality_values_(self) -> Any:\n        return self.duration\n\n    def _quil_(self, qubits: Tuple['cirq.Qid', ...], formatter: 'cirq.QuilFormatter'):\n        return 'WAIT\\n'\n\n\ndef wait(\n    *target: 'cirq.Qid',\n    duration: 'cirq.DURATION_LIKE' = None,\n    picos: Union[int, float, sympy.Basic] = 0,\n    nanos: Union[int, float, sympy.Basic] = 0,\n    micros: Union[int, float, sympy.Basic] = 0,\n    millis: Union[int, float, sympy.Basic] = 0,\n) -> raw_types.Operation:\n    \"\"\"Creates a WaitGate applied to all the given qubits.\n\n    The duration can be specified as a DURATION_LIKE or using keyword args with\n    numbers in the appropriate units. See Duration for details.\n\n    Args:\n        *target: The qubits that should wait.\n        value: Wait duration (see Duration).\n        picos: Picoseconds to wait (see Duration).\n        nanos: Picoseconds to wait (see Duration).\n        micros: Picoseconds to wait (see Duration).\n        millis: Picoseconds to wait (see Duration).\n    \"\"\"\n    return WaitGate(\n        duration=value.Duration(\n            duration,\n            picos=picos,\n            nanos=nanos,\n            micros=micros,\n            millis=millis,\n        ),\n        qid_shape=protocols.qid_shape(target),\n    ).on(*target)\n", "path": "cirq/ops/wait_gate.py"}], "after_files": [{"content": "# Copyright 2019 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 AbstractSet, Any, Dict, Optional, Tuple, TYPE_CHECKING, Union\n\nimport sympy\n\nfrom cirq import value, protocols\nfrom cirq.ops import raw_types\n\nif TYPE_CHECKING:\n    import cirq\n\n\n@value.value_equality\nclass WaitGate(raw_types.Gate):\n    \"\"\"A single-qubit idle gate that represents waiting.\n\n    In non-noisy simulators, this gate is just an identity gate. But noisy\n    simulators and noise models may insert more error for longer waits.\n    \"\"\"\n\n    def __init__(\n        self,\n        duration: 'cirq.DURATION_LIKE',\n        num_qubits: Optional[int] = None,\n        qid_shape: Tuple[int, ...] = None,\n    ) -> None:\n        \"\"\"Initialize a wait gate with the given duration.\n\n        Args:\n            duration: A constant or parameterized wait duration. This can be\n                an instance of `datetime.timedelta` or `cirq.Duration`.\n        \"\"\"\n        self.duration = value.Duration(duration)\n        if not protocols.is_parameterized(self.duration) and self.duration < 0:\n            raise ValueError('duration < 0')\n        if qid_shape is None:\n            if num_qubits is None:\n                # Assume one qubit for backwards compatibility\n                qid_shape = (2,)\n            else:\n                qid_shape = (2,) * num_qubits\n        if num_qubits is None:\n            num_qubits = len(qid_shape)\n        if not qid_shape:\n            raise ValueError('Waiting on an empty set of qubits.')\n        if num_qubits != len(qid_shape):\n            raise ValueError('len(qid_shape) != num_qubits')\n        self._qid_shape = qid_shape\n\n    def _is_parameterized_(self) -> bool:\n        return protocols.is_parameterized(self.duration)\n\n    def _parameter_names_(self) -> AbstractSet[str]:\n        return protocols.parameter_names(self.duration)\n\n    def _resolve_parameters_(self, resolver: 'cirq.ParamResolver', recursive: bool) -> 'WaitGate':\n        return WaitGate(protocols.resolve_parameters(self.duration, resolver, recursive))\n\n    def _qid_shape_(self) -> Tuple[int, ...]:\n        return self._qid_shape\n\n    def _has_unitary_(self) -> bool:\n        return True\n\n    def _apply_unitary_(self, args):\n        return args.target_tensor  # Identity.\n\n    def _decompose_(self, qubits):\n        return []\n\n    def _trace_distance_bound_(self):\n        return 0\n\n    def __pow__(self, power):\n        if power == 1 or power == -1:\n            # The inverse of a wait is still a wait.\n            return self\n        # Other scalar exponents could scale the wait... but ultimately it is\n        # ambiguous whether the user wanted to scale the duration or just wanted\n        # to affect the unitary. Play it safe and fail.\n        return NotImplemented\n\n    def __str__(self) -> str:\n        return f'WaitGate({self.duration})'\n\n    def __repr__(self) -> str:\n        return f'cirq.WaitGate({repr(self.duration)})'\n\n    def _json_dict_(self) -> Dict[str, Any]:\n        d = protocols.obj_to_dict_helper(self, ['duration'])\n        if len(self._qid_shape) != 1:\n            d['num_qubits'] = len(self._qid_shape)\n        if any(d != 2 for d in self._qid_shape):\n            d['qid_shape'] = self._qid_shape\n        return d\n\n    @classmethod\n    def _from_json_dict_(cls, duration, num_qubits=None, qid_shape=None, **kwargs):\n        return cls(\n            duration=duration,\n            num_qubits=num_qubits,\n            qid_shape=None if qid_shape is None else tuple(qid_shape),\n        )\n\n    def _value_equality_values_(self) -> Any:\n        return self.duration\n\n    def _quil_(self, qubits: Tuple['cirq.Qid', ...], formatter: 'cirq.QuilFormatter'):\n        return 'WAIT\\n'\n\n\ndef wait(\n    *target: 'cirq.Qid',\n    duration: 'cirq.DURATION_LIKE' = None,\n    picos: Union[int, float, sympy.Basic] = 0,\n    nanos: Union[int, float, sympy.Basic] = 0,\n    micros: Union[int, float, sympy.Basic] = 0,\n    millis: Union[int, float, sympy.Basic] = 0,\n) -> raw_types.Operation:\n    \"\"\"Creates a WaitGate applied to all the given qubits.\n\n    The duration can be specified as a DURATION_LIKE or using keyword args with\n    numbers in the appropriate units. See Duration for details.\n\n    Args:\n        *target: The qubits that should wait.\n        value: Wait duration (see Duration).\n        picos: Picoseconds to wait (see Duration).\n        nanos: Nanoseconds to wait (see Duration).\n        micros: Microseconds to wait (see Duration).\n        millis: Milliseconds to wait (see Duration).\n    \"\"\"\n    return WaitGate(\n        duration=value.Duration(\n            duration,\n            picos=picos,\n            nanos=nanos,\n            micros=micros,\n            millis=millis,\n        ),\n        qid_shape=protocols.qid_shape(target),\n    ).on(*target)\n", "path": "cirq/ops/wait_gate.py"}]}