-
Notifications
You must be signed in to change notification settings - Fork 10
flag to run simulation in reverse #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… simulations backward - C++ and Python tests of this for cost and line aware simulations See discussion munich-quantum-toolkit#223 . Note: This requires C++20: mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS='-lgtest -std=c++20' -DBINDINGS=ON Building the Python wheel: export CXXFLAGS='-lgtest -std=c++20' python3 -m build --wheel Test Python binding simple_simulation: python -m pytest test/python/test_syrec.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
This looks good overall, but it's not necessary to use C++20 features here. See the inline comment.
for (const auto& g: std::ranges::reverse_view(circ)) { | ||
coreGateSimulation(*g, output); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use ranges here and raise the minimum standard to C++20.
Just use circ.crbegin()
and circ.crend()
to do the reverse iteration.
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
simpleSimulation
for running simulations backwardNote: This requires C++20:
Building the Python wheel:
Test Python binding
simple_simulation
:Fixes discussion #223 .