Open alecandido opened 3 weeks ago
@Simone-Bordoni can you take a look at the description? I'm not asking you to implement anything of what I described. And maybe it's not even urgent to anything at all. But at least I would have a consistent issue for when someone will be able to take over the project.
Similarly, I'd like to open an issue about the naming of qubits and nodes in the connectivity graph. Would it be better to discuss this here, or should I create a separate issue?
Similarly, I'd like to open an issue about the naming of qubits and nodes in the connectivity graph. Would it be better to discuss this here, or should I create a separate issue?
The two things are related, and they will be most likely solved together. Feel free to discuss it even here :) (but if you have a different opinion, do what you consider best)
Currently, the transpiler is designed to interpret integer connectivity graph nodes i
as string physical qubit names "q" + str(i)
.
For example, consider the connectivity graph:
and the physical-to-logical mapping:
{'q0': 4, 'q1': 0, 'q2': 2, 'q3': 1, 'q4': 3}
.
If we want to enable custom string names for qubits, the naming scheme will need to be updated.
Possible options are:
At the moment it is possible to select a subset of qubits in the connectivity when defining a transpiling pipeline (PR #1121). You can't restric the connectivity if using a single transpiler step, however in that case it would be just sufficient to manually remove the nodes from the connectivity graph. On the other hand, i think it would be important to allow for general names of the names of the graph (not only "qi"). However, i think it is important to have the requirement that the names of the connectivity graph match the names of the hardware qubits in order to avoid confusion.
However, i think it is important to have the requirement that the names of the connectivity graph match the names of the hardware qubits in order to avoid confusion.
Yes, indeed. That's why I linked immediately https://github.com/qiboteam/qibolab/issues/1009, as a "dependency" of this issue (there are parts of this issue that could be worked on before, but that has to be solved first to complete this).
Thanks, then I will update the Placer
and test files to use the same names for connectivity graph nodes and hardware qubit names (wire_names
) in qibo side.
Currently, the transpiler is already providing some padding https://github.com/qiboteam/qibo/blob/ecbd16d7d8f2b6780bacbb7b92c9f2b3fc44087b/src/qibo/transpiler/optimizer.py#L19-L33 but just applying the basic approach, i.e. padding at the end.
However, there is not much more that can be done at the moment, since Qibolab does not support using its own qubits' names in circuits. https://github.com/qiboteam/qibolab/issues/1009
As soon as that will be available, it would be interesting to offer the option to choose which subset of qubits should be targeted. And applying padding only at the end.
This last part could be done even immediately: sometimes it may be interesting to route a circuit on a subset of the whole qubits and connectivity (even though some subsets will make impossible to execute some circuits), so padding as preprocessing and padding as postprocessing are truly two different features, and only the first is currently available (unless I'm missing something).