From b4909ce037c6759d3ce19147485c2b6bd5e80f35 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Thu, 25 Jul 2024 15:17:13 -0400 Subject: [PATCH] fixes --- pennylane/registers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pennylane/registers.py b/pennylane/registers.py index 602a0061a16..c33a481c309 100644 --- a/pennylane/registers.py +++ b/pennylane/registers.py @@ -40,10 +40,12 @@ def registers(register_dict): **Example** Given flat input dictionary: + >>> qml.registers({"alice": 2, "bob": 3}) {'alice': Wires([0, 1]), 'bob': Wires([2, 3, 4])} Given nested input dictionary: + >>> wire_registers = qml.registers({"people": {"alice": 2, "bob": 1}}) >>> wire_dict {'alice': Wires([0, 1]), 'bob': Wires([2]), 'people': Wires([0, 1, 2])}