From 6113fd557261f2b1c6e1439b17cc6644c015572d Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Tue, 3 Dec 2024 19:40:06 +0100 Subject: [PATCH] :label: Type interface for all obstruction layouts --- .../pyfiction/layouts/obstruction_layout.hpp | 2 + bindings/mnt/pyfiction/pyfiction.pyi | 72 +++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/bindings/mnt/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp index 694fc0069..c0e20b6f5 100644 --- a/bindings/mnt/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp @@ -12,6 +12,8 @@ #include +#include + namespace pyfiction { diff --git a/bindings/mnt/pyfiction/pyfiction.pyi b/bindings/mnt/pyfiction/pyfiction.pyi index bf3eb9e74..e84c69327 100644 --- a/bindings/mnt/pyfiction/pyfiction.pyi +++ b/bindings/mnt/pyfiction/pyfiction.pyi @@ -1034,6 +1034,78 @@ class hexagonal_gate_layout(clocked_hexagonal_layout): def __repr__(self) -> str: ... +class cartesian_obstruction_layout(cartesian_gate_layout): + @overload + def __init__(self) -> None: ... + + @overload + def __init__(self, layout: cartesian_gate_layout) -> None: ... + + def obstruct_coordinate(self, c: offset_coordinate) -> None: ... + + def obstruct_connection(self, src: offset_coordinate, tgt: offset_coordinate) -> None: ... + + def is_obstructed_coordinate(self, c: offset_coordinate) -> bool: ... + + def is_obstructed_connection(self, src: offset_coordinate, tgt: offset_coordinate) -> bool: ... + + def clear_obstructed_coordinate(self, c: offset_coordinate) -> None: ... + + def clear_obstructed_connection(self, src: offset_coordinate, tgt: offset_coordinate) -> None: ... + + def clear_obstructed_coordinates(self) -> None: ... + + def clear_obstructed_connections(self) -> None: ... + + +class shifted_cartesian_obstruction_layout(shifted_cartesian_gate_layout): + @overload + def __init__(self) -> None: ... + + @overload + def __init__(self, layout: shifted_cartesian_gate_layout) -> None: ... + + def obstruct_coordinate(self, c: offset_coordinate) -> None: ... + + def obstruct_connection(self, src: offset_coordinate, tgt: offset_coordinate) -> None: ... + + def is_obstructed_coordinate(self, c: offset_coordinate) -> bool: ... + + def is_obstructed_connection(self, src: offset_coordinate, tgt: offset_coordinate) -> bool: ... + + def clear_obstructed_coordinate(self, c: offset_coordinate) -> None: ... + + def clear_obstructed_connection(self, src: offset_coordinate, tgt: offset_coordinate) -> None: ... + + def clear_obstructed_coordinates(self) -> None: ... + + def clear_obstructed_connections(self) -> None: ... + + +class hexagonal_obstruction_layout(hexagonal_gate_layout): + @overload + def __init__(self) -> None: ... + + @overload + def __init__(self, layout: hexagonal_gate_layout) -> None: ... + + def obstruct_coordinate(self, c: cube_coordinate) -> None: ... + + def obstruct_connection(self, src: cube_coordinate, tgt: cube_coordinate) -> None: ... + + def is_obstructed_coordinate(self, c: cube_coordinate) -> bool: ... + + def is_obstructed_connection(self, src: cube_coordinate, tgt: cube_coordinate) -> bool: ... + + def clear_obstructed_coordinate(self, c: cube_coordinate) -> None: ... + + def clear_obstructed_connection(self, src: cube_coordinate, tgt: cube_coordinate) -> None: ... + + def clear_obstructed_coordinates(self) -> None: ... + + def clear_obstructed_connections(self) -> None: ... + + class qca_technology: class cell_type(Enum): EMPTY = ...