Basic simulator of a gate-based quantum computer, which takes ascii-pictures of circuit diagrams as input.
A simple teleportation circuit is realized as follows:
circ_tp = QCirc.FromString("""
| H |
X-. |
| X-.
| | H
| M M -> v1, v2
X | | if v2
Z | | if v1
""")
result_tp = DOp.MeldStack(circ_tp.simulate(DOp.GroundState(3)))
DOp.MeasureProb(result_tp,0,1)For an overview of the functionality, refer to QCSim_Examples.ipynb.