|
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | | -from typing import Callable, List, Sequence, Any, Union, Dict |
| 14 | +from typing import Sequence, Any, Union, Dict |
15 | 15 | import numpy as np |
16 | 16 | import networkx as nx |
17 | 17 |
|
18 | 18 | import cirq |
19 | | -from cirq import _compat, GridQubit, LineQubit |
| 19 | +from cirq import GridQubit, LineQubit |
20 | 20 | from cirq.ops import NamedQubit |
21 | 21 | from cirq_pasqal import ThreeDQubit, TwoDQubit, PasqalGateset |
22 | 22 |
|
@@ -286,32 +286,3 @@ def _value_equality_values_(self) -> Any: |
286 | 286 |
|
287 | 287 | def _json_dict_(self) -> Dict[str, Any]: |
288 | 288 | return cirq.protocols.obj_to_dict_helper(self, ['control_radius', 'qubits']) |
289 | | - |
290 | | - |
291 | | -@_compat.deprecated_class( |
292 | | - deadline='v0.16', fix='Use cirq.optimize_for_target_gateset(circuit, gateset=PasqalGateset()).' |
293 | | -) |
294 | | -class PasqalConverter(cirq.neutral_atoms.ConvertToNeutralAtomGates): |
295 | | - """A gate converter for compatibility with Pasqal processors. |
296 | | -
|
297 | | - Modified version of ConvertToNeutralAtomGates, where a new 'convert' method |
298 | | - 'pasqal_convert' takes the 'keep' function as an input. |
299 | | - """ |
300 | | - |
301 | | - def pasqal_convert( |
302 | | - self, op: cirq.Operation, keep: Callable[[cirq.Operation], bool] |
303 | | - ) -> List[cirq.Operation]: |
304 | | - def on_stuck_raise(bad): |
305 | | - return TypeError( |
306 | | - "Don't know how to work with {!r}. " |
307 | | - "It isn't a native PasqalDevice operation, " |
308 | | - "a 1 or 2 qubit gate with a known unitary, " |
309 | | - "or composite.".format(bad) |
310 | | - ) |
311 | | - |
312 | | - return cirq.protocols.decompose( |
313 | | - op, |
314 | | - keep=keep, |
315 | | - intercepting_decomposer=self._convert_one, |
316 | | - on_stuck_raise=None if self.ignore_failures else on_stuck_raise, |
317 | | - ) |
0 commit comments