Agony5757 / QPanda-lite

A python-native version for pyqpanda. Simple, easy, and transparent.
Apache License 2.0
17 stars 12 forks source link

OpenQASM to OriginIR [init.] #12

Closed YunJ1e closed 1 year ago

YunJ1e commented 1 year ago

Beta version for support the translation from OpenQASM to OriginIR,

  1. This translation is not direct currently. It is done via parsing the OpenQASM and then creating the quantum circuit using our own circuit_builder. As long as we can build the correct circuit, the Origin_IR string will be generated automatically.

  2. The current version only supports H and CNOT. Apparently, in order to support a more general set of quantum operations, we need a new class 'qasm_line_parser', like OriginIR_Parser to do the same job as 'transform_line' currently in the qcircuit.py.