Closed thierry-martinez closed 2 months ago
example and docs bits can be done on my side as well, I will approve as soon as there's test for TN backend.
Could you also add appropriate lines to docs (e.g.
generator.rst
) so they show up in module references? also it might be good to illustrate the use of this feature in examples - perhaps simple example likerotation.py
?
I tried to improve the documentation in 1e97cdc. Thanks!
Thanks! Merged.
This pull request enables measures to be expressed at circuit level, in order to be able to consider circuits with classical outputs. Patterns are now allowed to measure all their nodes, and have an empty output node set, to enable to consider patterns where only classical outputs are considered.
Transpiled circuits can now have "measure" gates, introduced with the
circ.m(qubit, plane, angle)
method. The measured qubit cannot be used in any subsequent gate. The transpiler now returns aTranspileResult
dataclass: the pattern is available in thepattern
field, and the fieldclassical_outputs
contains the index where the classical measures can be found in theresults
array of the simulator.