Skip to content
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

Integrate Neutral Atom State Preparation #500

Merged
merged 75 commits into from
Nov 16, 2024
Merged

Integrate Neutral Atom State Preparation #500

merged 75 commits into from
Nov 16, 2024

Conversation

ystade
Copy link
Contributor

@ystade ystade commented Aug 5, 2024

Description

It adds a new functionality to generate minimal schedules for preparing logical arrays on the neutral atom architecture.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

@ystade ystade self-assigned this Aug 5, 2024
@ystade ystade added feature New feature or request c++ Anything related to C++ code minor Changes leading to a minor version increase labels Aug 5, 2024
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 56 lines in your changes missing coverage. Please review.

Project coverage is 90.5%. Comparing base (d3632f4) to head (f264546).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/na/nasp/Solver.cpp 91.6% 43 Missing ⚠️
src/na/nasp/CodeGenerator.cpp 91.1% 12 Missing ⚠️
include/na/nasp/Solver.hpp 95.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #500     +/-   ##
=======================================
+ Coverage   90.4%   90.5%   +0.1%     
=======================================
  Files         87      91      +4     
  Lines      10052   10784    +732     
  Branches    1722    1831    +109     
=======================================
+ Hits        9092    9770    +678     
- Misses       960    1014     +54     
Flag Coverage Δ
cpp 90.3% <92.3%> (+0.1%) ⬆️
python 95.9% <ø> (ø)
Files with missing lines Coverage Δ
include/na/Architecture.hpp 100.0% <ø> (ø)
include/na/Configuration.hpp 100.0% <ø> (ø)
include/na/nalac/NAMapper.hpp 100.0% <ø> (ø)
src/na/Architecture.cpp 98.0% <100.0%> (+<0.1%) ⬆️
src/na/Configuration.cpp 94.4% <ø> (ø)
src/na/nalac/NAGraphAlgorithms.cpp 94.4% <ø> (ø)
src/na/nalac/NAMapper.cpp 89.8% <ø> (ø)
src/na/nasp/SolverFactory.cpp 100.0% <100.0%> (ø)
include/na/nasp/Solver.hpp 95.0% <95.0%> (ø)
src/na/nasp/CodeGenerator.cpp 91.1% <91.1%> (ø)
... and 1 more

(*it)->execute();
}
}
for (std::uint16_t t = 1; t < result.numStages(); ++t) {

Check failure

Code scanning / CodeQL

Comparison of narrow type with wide type in loop condition

Comparison between [t](1) of type uint16_t and [call to numStages](2) of wider type size_t.
std::vector<std::shared_ptr<Point>> loadEndPositions;
std::vector<std::shared_ptr<Point>> storeStartPositions;
std::vector<std::shared_ptr<Point>> storeEndPositions;
for (std::uint16_t i = 0; i < result.getStage(t).numQubits(); ++i) {

Check failure

Code scanning / CodeQL

Comparison of narrow type with wide type in loop condition

Comparison between [i](1) of type uint16_t and [call to numQubits](2) of wider type size_t.
src/na/nasp/Optimizer.cpp Fixed Show fixed Hide fixed
src/na/nasp/Solver.cpp Fixed Show fixed Hide fixed
src/na/nasp/Solver.cpp Fixed Show fixed Hide fixed
src/na/nasp/Solver.cpp Fixed Show fixed Hide fixed
src/na/nasp/Solver.cpp Fixed Show fixed Hide fixed
model.eval(bv2int(stage.getQubit(i).getV(), true)).get_numeral_int());
}
std::vector<Result::Gate> resultGates;
for (std::uint16_t i = 0; i < gates.size(); ++i) {

Check failure

Code scanning / CodeQL

Comparison of narrow type with wide type in loop condition

Comparison between [i](1) of type uint16_t and [call to size](2) of wider type size_type.
src/na/nasp/Solver.cpp Fixed Show fixed Hide fixed
model.eval(bv2int(stage.getQubit(i).getV(), true)).get_numeral_int());
}
std::vector<Result::Gate> resultGates;
for (std::uint16_t i = 0; i < gates.size(); ++i) {

Check failure

Code scanning / CodeQL

Comparison of narrow type with wide type in loop condition

Comparison between [i](1) of type uint16_t and [call to size](2) of wider type size_type.
@ystade
Copy link
Contributor Author

ystade commented Aug 6, 2024

@burgholzer I know that you removed the #include <sys/wait.h> or rather replaced it by #include <wait.h>. But I do not get it to work this way. The problem is in src/na/nasp/Optimizer.cpp.

Copy link
Member

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads-up: I haven't really checked the implementations in all their detail. I mostly went through the tests and the interfaces in the headers and commented on aspects that I think could use some improvement from the using side of things.

Overall this looks really great though! Thanks for all the work!
I hope it doesn't take up too much time to address the points raised in the inline comments.
I think it's the right time to think about some of the interfaces now though. Otherwise, there will probably always be something more important to do instead of refactoring the code.

test/na/nasp/test_codegenerator.cpp Outdated Show resolved Hide resolved
test/na/nasp/test_codegenerator.cpp Outdated Show resolved Hide resolved
test/na/nasp/test_solver.cpp Outdated Show resolved Hide resolved
test/na/nasp/test_solver.cpp Outdated Show resolved Hide resolved
test/na/nasp/test_solver.cpp Outdated Show resolved Hide resolved
include/na/nasp/Solver.hpp Outdated Show resolved Hide resolved
include/na/nasp/Solver.hpp Outdated Show resolved Hide resolved
src/na/nasp/CodeGenerator.cpp Outdated Show resolved Hide resolved
src/na/nasp/CodeGenerator.cpp Outdated Show resolved Hide resolved
src/na/nasp/SolverFactory.cpp Outdated Show resolved Hide resolved
Copy link
Member

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unrelated error was fixed by #559, so this can finally go in.
Merging as soon as the test suite runs through 🚀

@burgholzer burgholzer enabled auto-merge (squash) November 16, 2024 20:49
@burgholzer burgholzer merged commit ba4d08f into main Nov 16, 2024
28 checks passed
@burgholzer burgholzer deleted the wip-smt-na branch November 16, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Anything related to C++ code feature New feature or request minor Changes leading to a minor version increase
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants