mqt-core icon indicating copy to clipboard operation
mqt-core copied to clipboard

Ancillary and garbage support for `.real` parser

Open burgholzer opened this issue 2 years ago • 0 comments

At the moment, the .real file parser (see https://github.com/cda-tum/qfr/blob/main/src/parsers/RealParser.cpp) does not handle constant or garbage definitions properly. This has not been particularly important up until now, since we typically just consider the whole state vector during simulation (e.g., in cda-tum/ddsim#main) and similarly the complete functionality for equivalence checking. However, it might become important in the future for our endeavours towards reversible circuits.

In particular,

  • any constant should be properly flagged as an ancillary qubit in the resulting QuantumComputation.
  • any garbage should be properly flagged as a garbage qubit in the resulting QuantumComputation.
  • the inputs and outputs could be used to determine the initial_layout and the output_permutation respectively. Although, it is not so clear whether this is possible for any .real file.

burgholzer avatar Apr 22 '22 14:04 burgholzer