Skip to content

♻️ Merging QuantumComputation and NAComputation` #874

@burgholzer

Description

@burgholzer

We started the discussion on whether it makes sense to merge NAComputation into the existing QuantumComputation. As it stands right now, I would still argue that it makes sense to keep the concepts separate even though I see the duplication of code here. There are a few fundamental differences, that I want to list in the following. Most of the points are a consequence of that the QuantumComputation was primarily designed with SC and qiskit in mind.

  • SC does not have the concept of zoned (global) operations. Hence, they are missing in the QuantumComputation. Even though this is not a deal breaker to add those, it may add additional checks to existing tools, whether a given QuantumComputation can be processed or not.
  • The same holds for all shuttling operations. Again, even though it is not a deal breaker to add those to the QuantumComputation (which actually exist somewhere already created by Ludwig), this causes some changes in the infrastructure. For example, the standard output format of a QuantumComputation is QASM. However, QASM does not support shuttling operations. Me personally, I would be quite hesitant to add some custom syntax to QASM for shuttling operations as seems not the right way to be to augment something that is tailored to SC for NA. This is mainly related to the next point.
  • As a consequence of the above, atoms (qubits) do not have a fixed position. Even though it is still possible to index the existing atoms from 0 to n as one does for SC, at least some operations need coordinates as input. I have the feeling that this does not fit very well into the QASM format. One reason for this might be, that we definitely want to move multiple atoms at the same time. QASM does not offer a good way to express the scheduling of operations, e.g., to express that a group of operations is executed simultaneously.
  • The main purpose of 🎨 Refactor NAComputation with concrete base classes for every operation and ouput new .naviz format #846 was to make NAComputation output the new format that mqt-naviz understands. I would very much like to keep this feature. This means when merging both representations, QuantumComputation requires a new output method for the .naviz format.

Overall, I think everything is possible and there is no fundamental obstacle of merging both representations. It just generates some work to merge the different concepts. Additionally, one must accept that one merges the concepts of computations meant for SC and for NA.

Originally posted by @ystade in #862 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions