unique qubit name generator?

I am writing a function that builds a combinational logic circuit using gates provided by dwavebinarycsp.factories.constraint.gates.  The circuit has internal interconnections that are of no interest to the caller.  The function has to choose names for the qubits representing those internal interconnections, and there is a risk that the caller might inadvertently use those same names for other qubits.  Is there a unique qubit name generator that my function could use?

For the moment, I am dealing with this by letting the caller provide a stem to which the function appends suffixes to create qubit names.  The caller is responsible for not using the stem to name other qubits.  I think this will work OK, but I am a little bit uncomfortable with it, and I would like to hear what others think.

0

Comments

3 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post