Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Ferracin committed Jan 31, 2024
1 parent a7e8e21 commit 3747b35
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions mrmustard/lab_dev/wires.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

from mrmustard import settings

__all__ = ["Wires"]

# pylint: disable=import-outside-toplevel


Expand Down Expand Up @@ -85,11 +87,16 @@ class Wires:
To access the index of a su set of wires in standard order (i.e. skipping over wires not belonging to the subset),
one can use the ``indices`` attribute:
.. code-block::
>>> w = Wires(modes_in_ket = [0,1], modes_out_ket = [0,1])
>>> assert w.indices == [0,1,2,3]
>>> assert w.input.indices == [2,3]
>>>
>>> from mrmustard.lab_dev.wires import Wires
>>> w = Wires(modes_in_ket = [0,1], modes_out_ket = [0,1])
>>> assert w.indices == [0,1,2,3]
>>> assert w.input.indices == [2,3]
Note that subsets return new ``Wires`` objects with the same ids as the original object.
Args:
Expand Down

0 comments on commit 3747b35

Please sign in to comment.