enable simulation of controlled gates in classical simulator
Currently, only X, CNOT, TOFFOLI, SWAP, and measurement are supported by cirq.ClassicalStateSimulator. This pull request adds support for versions of the first four gates with an arbitrary number of controls (as generated by the .controlled() function).
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.81%. Comparing base (
f246c2b) to head (083f79c). Report is 2 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6589 +/- ##
=======================================
Coverage 97.81% 97.81%
=======================================
Files 1063 1063
Lines 91761 91796 +35
=======================================
+ Hits 89755 89793 +38
+ Misses 2006 2003 -3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
whoops, I realized why I wasn't seeing the linter errors locally---I was mistaken about what running format-incremental checked for. I thought it was equivalent to pylint but only on changed lines. Anyway all pylint checks seem to pass with my latest commit so I think CI should pass now :-)