diff --git a/mrmustard/lab_dev/wires.py b/mrmustard/lab_dev/wires.py index 5c87029f9..63bf1ec5a 100644 --- a/mrmustard/lab_dev/wires.py +++ b/mrmustard/lab_dev/wires.py @@ -83,6 +83,13 @@ class Wires: >>> assert w.output.ket.ids == w.ids[4:6] >>> assert w.input.ket.ids == w.ids[6:] + 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] + >>> Note that subsets return new ``Wires`` objects with the same ids as the original object. Args: