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

✨ Neutral Atom Mapper #417

Merged
merged 153 commits into from
May 13, 2024
Merged

✨ Neutral Atom Mapper #417

merged 153 commits into from
May 13, 2024

Conversation

ystade
Copy link
Contributor

@ystade ystade commented Jan 24, 2024

Description

This is the start of a mapper tailored to the neutral atom platform. Peculiarities are global gates and shuttling of atoms, among others.

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 added the feature New feature or request label Jan 24, 2024
@ystade ystade self-assigned this Jan 24, 2024
[[nodiscard]] auto length() { return std::abs(x * x + y * y); }
};

// template <typename Value> using Grid = std::vector<std::vector<Value>>;

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
Value const tEff;
inline DecoherenceTimes(Value t1, Value t2)
: t1(t1), t2(t2), tEff(t1 * t2 / (t1 + t2)) {}
operator const double() const { return tEff; }

Check warning

Code scanning / CodeQL

Constant return type on member

The 'const' modifier has no effect on return types. The 'const' modifying the return type can be removed.
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.

Alright. Many thanks for this initial start. I took the time to go really in-depth with the comments here as this is one of the first reviews. Please do not feel overwhelmed by the amount of comments. Most of them are benign and very easy/fast to fix/address. Some are even just purely style guidelines that you should probably be aware of. but not even need to follow like a rule book.
If any of the comments should be unclear, I am sorry and please ask follow-up questions in the comments.

Some of the comments directly come with suggestions. In most cases, you can just apply these suggestions directly on GitHub. In case you are not aware of that: you can even go to the "Files Changes" Tab and add multiple suggestions to a batch. That way it results in fewer commits. Resolving suggestions this way also automatically resolves the corresponding comment.

If a comment does not warrant further discussion and you have implemented the requested changes or acknowledged the comment and there is no action item, feel free to resolve comments yourself. If a comment involves some back and forth, the last person commenting should typically not be the person resolving the comment.

Please let me know, if anything is unclear.

include/na/Architecture.hpp Outdated Show resolved Hide resolved
include/na/Architecture.hpp Outdated Show resolved Hide resolved
include/na/Architecture.hpp Outdated Show resolved Hide resolved
include/na/Architecture.hpp Outdated Show resolved Hide resolved
include/na/Architecture.hpp Outdated Show resolved Hide resolved
src/na/Architecture.cpp Outdated Show resolved Hide resolved
src/na/Architecture.cpp Outdated Show resolved Hide resolved
src/na/Architecture.cpp Outdated Show resolved Hide resolved
src/na/Architecture.cpp Outdated Show resolved Hide resolved
test/na/test_architecture.cpp Show resolved Hide resolved
@ystade
Copy link
Contributor Author

ystade commented Feb 1, 2024

@burgholzer Thanks for the helpful review, this was exactly the degree of detail I was looking for.

src/na/NAMapper.cpp Fixed Show fixed Hide fixed
@ystade ystade marked this pull request as ready for review May 7, 2024 05:15
ystade and others added 9 commits May 9, 2024 08:44
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
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.

Alright, made it through the whole code at least once in a rather quick fashion. Optimized a couple of things (mostly reserving the size for a couple of vectors and replacing the use of std::iota with explicit for loops).

To be fair, I did not go fully in depth, when it comes to the larger functions in the Mapper itself, as these are rather convoluted. But from quickly glancing over everything, it seems reasonable. We can always iterate on the code itself later on and improve things.

What I noticed is that some of the docstrings are a bit messed up/incomplete (especially noticed in the NAGraphAlgorithms file). Maybe worth looking into before eventually merging this PR here.

Once you are satisfied with everything, I'd say we can go ahead with merging the mqt-core PR, update the submodule here and get this PR merged. 🎉

@burgholzer burgholzer added this to the Neutral Atom Compilation milestone May 10, 2024
ystade added a commit to cda-tum/mqt-core that referenced this pull request May 13, 2024
## Description

This pull request includes all modifications and data structures that
are generally useful and required for the implementation of the neutral
atom mapper, see
[mqt-qmap#417](cda-tum/mqt-qmap#417).

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.
@ystade ystade merged commit 0606489 into main May 13, 2024
33 checks passed
@ystade ystade deleted the wip-na-qmap branch May 13, 2024 07:26
@ystade ystade restored the wip-na-qmap branch May 13, 2024 07:27
@ystade ystade deleted the wip-na-qmap branch June 5, 2024 07:15
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