@@ -285,7 +285,7 @@ def rect(rows: int, cols: int, top: int = 0, left: int = 0, *, dimension: int) -
285
285
286
286
@staticmethod
287
287
def from_diagram (diagram : str , dimension : int ) -> list [GridQid ]:
288
- """Parse ASCII art device layout into a device.
288
+ r """Parse ASCII art device layout into a device.
289
289
290
290
As an example, the below diagram will create a list of GridQid in a
291
291
pyramid structure.
@@ -322,7 +322,7 @@ def from_diagram(diagram: str, dimension: int) -> list[GridQid]:
322
322
a row. Alphanumeric characters are assigned as qid.
323
323
Dots ('.'), dashes ('-'), and spaces (' ') are treated as
324
324
empty locations in the grid. If diagram has characters other
325
- than alphanumerics, spacers, and newlines ('\\ n'), an error will
325
+ than alphanumerics, spacers, and newlines ('\n'), an error will
326
326
be thrown. The top-left corner of the diagram will be have
327
327
coordinate (0, 0).
328
328
@@ -439,7 +439,7 @@ def rect(rows: int, cols: int, top: int = 0, left: int = 0) -> list[GridQubit]:
439
439
440
440
@staticmethod
441
441
def from_diagram (diagram : str ) -> list [GridQubit ]:
442
- """Parse ASCII art into device layout info.
442
+ r """Parse ASCII art into device layout info.
443
443
444
444
As an example, the below diagram will create a list of
445
445
GridQubit in a pyramid structure.
@@ -476,7 +476,7 @@ def from_diagram(diagram: str) -> list[GridQubit]:
476
476
a row. Alphanumeric characters are assigned as qid.
477
477
Dots ('.'), dashes ('-'), and spaces (' ') are treated as
478
478
empty locations in the grid. If diagram has characters other
479
- than alphanumerics, spacers, and newlines ('\\ n'), an error will
479
+ than alphanumerics, spacers, and newlines ('\n'), an error will
480
480
be thrown. The top-left corner of the diagram will be have
481
481
coordinate (0,0).
482
482
@@ -503,7 +503,7 @@ def _json_dict_(self) -> dict[str, Any]:
503
503
504
504
505
505
def _ascii_diagram_to_coords (diagram : str ) -> list [tuple [int , int ]]:
506
- """Parse ASCII art device layout into info about qids coordinates
506
+ r """Parse ASCII art device layout into info about qids coordinates
507
507
508
508
Args:
509
509
diagram: String representing the qid layout. Each line represents
0 commit comments