-
Notifications
You must be signed in to change notification settings - Fork 0
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
Circuit layout #9
Comments
The graph approach is the most interesting. In fact, we could take this opportunity to:
Another relevant point is the qubit representation, I think we should reconsider a more general approach to the problem by including a representation of multi level quantum systems (qubit, qutrid and beyond). |
As already declared in #6, I'd like to avoid explicit references to qubits/qudits. They are not strictly required to create some gates, nor a circuit (we just need to refer to some sort of local subsystems - for the time being, I'm calling them The current strategy is summarized in the related docs: Lines 3 to 12 in efb6992
However, while this could work for just single qubits gates (you only need to know where to append your gates, or to measure, that is one special case), it doesn't work for asymmetric multi-qubit gates. My current idea is to start thinking gates as subgraphs, rather than atomic nodes. The internal connectivity is not relevant, as long as there is some kind of convention, but the relevant part is that each leg will be connected to a different node. I.e.:
The simplest way I can imagine is to use pairs of integers to identify nodes, where the first element will identify the gate, and the second the index internal to the gate (and, by internal convention, |
The current
Circuit
is mainly composed of a_Queue
, that is essentially a list of gates.This is not a bad, because the essential feature of gates is being sorted, so happening after some others.
If there were only single qubit gates, this would have not been the best choice, since the sorting would have been local. In that case, one list per qubit should have been the optimal representation.
Since this is not the case, that alone is not an option.
Then, there are a few options:
The last option would get closer to the tensor network idea, and make all the information about the connections transparent, without any need to reconstruct from the gates. In principle, we could even just place identifiers in the graph itself, and store the actual gates in a separate list (that's again similar to the current layout, but stripping any sequence semantics from the list, and the qubits specification from the gates).
I'm tempted to attempt the graph way, it should make it simpler also to represent controlled gates. Do you see any drawback?
The text was updated successfully, but these errors were encountered: