-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring the Layout class #11604
Comments
We have to be careful about changing what's stored inside a Bits have been able to have no For point 3, I definitely agree it's got all the information in one place, but the trick to me is that the register information shouldn't be part of any comparison here. Comparing the names of registers (which are just ad-hoc named collections of bits) is something that really only Point 1 is what (imo) we should do if we were starting the class from afresh; Footnotes
|
What should we add?
When the
Bit
class becomes opaque (see #10996 ), the reference ofQubit
s in a quantum circuit must stay consistent during the execution of the python session. However, we can not guarantee this in all use cases. One example is the parallel execution of transpilation jobs where the user provides an initial layout. In these cases, thepassmanager
is serialized, leading to newQubit
instances and a thus mismatch of reference of the qubits between the quantum circuit to be transpiled and theLayout
in the deserializedpassmanager
.Thus, a refactoring of the
Layout
class is required with three proposal (so far):Bits
fromLayout
and store the permutation only e.g. as a list or dictionary of integers. @levbishopQuantumRegister
whenever aLayout
is initialized and store this information internally.Layout
define the bijectionBitLocations
.BitLocations
is a tupleI currently prefer proposal 3. as this gives you all information in one place.
The text was updated successfully, but these errors were encountered: