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

✨ Compile time flows and CLI simulation update #349

Merged
merged 64 commits into from
Dec 15, 2023
Merged

Conversation

marcelwa
Copy link
Collaborator

@marcelwa marcelwa commented Dec 7, 2023

Description

This PR introduces new CMake flags to build individual flows of the fiction CLI. Furthermore, it exposes SiDB simulation capabilities via the CLI.

The following CLI commands have been revised:

  • read now supports the --sqd/-s flag that reads SiQAD design files as SiDB cell-level layouts
  • print -c now prints SiDB layouts as H-Si lattices
  • print -c now prints charge states of SiDB layouts if a CDS is available

The following new CLI commands have been introduced:

  • quicksim to call the QuickSim algorithm
  • quickexact to call the QuickExact algorithm
  • temp to call a critical temperature simulation algorithm based on QuickExact
  • opdom to call an operational domain computation algorithm and write the resulting domain to a CSV file

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.

@marcelwa marcelwa added enhancement New feature or request cli Concerning the command-line interface (CLI) labels Dec 7, 2023
@marcelwa marcelwa self-assigned this Dec 7, 2023
@marcelwa
Copy link
Collaborator Author

marcelwa commented Dec 7, 2023

@Drewniok In this PR, I've started to expose SiDB simulation via the CLI. You can now use read --sqd (or read -s for short) SiQAD files and print them via print -c. Via commands quicksim and quickexact, you can generate a CDS, which you can print via print -c as well.

This is pretty basic as far as SiDB simulation on the command line can go, and there are several aspects and details I would like to discuss with you. Here are some things to ponder for you:

  • What other SiDB algorithms should we expose?
  • Right now, only the ground state (I think) is saved, how do we deal with the others?
  • The QuickExact implementation doesn't actually store its global potential variable to the further simulation parameters. I think it should.
  • QuickExact seems to store the base number additionally, even though it is included in the sim result object via the physical parameters.
  • Does QuickSim actually respect a given base number? No, right? In that case, the respective option needs to be removed again from the CLI.

Furthermore TODO:

  • Add documentation to the CLI chapter in the RTD pages.

Would be cool if you could play around with it such that we can have a discussion soon.

@Drewniok
Copy link
Collaborator

Drewniok commented Dec 7, 2023

@marcelwa That's super cool! Thank you! I will address your points as soon as possible.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

cli/cmd/io/read.hpp Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Outdated Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Outdated Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
include/fiction/types.hpp Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

include/fiction/types.hpp Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
@Drewniok
Copy link
Collaborator

Drewniok commented Dec 10, 2023

@Drewniok In this PR, I've started to expose SiDB simulation via the CLI. You can now use read --sqd (or read -s for short) SiQAD files and print them via print -c. Via commands quicksim and quickexact, you can generate a CDS, which you can print via print -c as well.

This is pretty basic as far as SiDB simulation on the command line can go, and there are several aspects and details I would like to discuss with you. Here are some things to ponder for you:

* What other SiDB algorithms should we expose?

* Right now, only the ground state (I think) is saved, how do we deal with the others?

* The QuickExact implementation doesn't actually store its global potential variable to the further simulation parameters. I think it should.

* QuickExact seems to store the base number additionally, even though it is included in the sim result object via the physical parameters.

* Does QuickSim actually respect a given base number? No, right? In that case, the respective option needs to be removed again from the CLI.

Furthermore TODO:

* Add documentation to the CLI chapter in the RTD pages.

Would be cool if you could play around with it such that we can have a discussion soon.

@marcelwa, I have two questions, comments:

  1. Are you referring to the CLI?
  2. The base number stored in the additional parameters is the base number actually used for the simulation. This can be different from the base number set by the physical parameters if automatic base number detection is enabled. But I see the confusion! I will change the naming.

@marcelwa
Copy link
Collaborator Author

@marcelwa I think all the above TODOs are done. As discussed, it would be convenient to have the critical temperature and part of the operational domain in the CLI. I can support you there!

Perfect, many thanks! 🙏 I'll come up with something and might ask for your feedback once it's done.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

cli/cmd/simulation/opdom.hpp Outdated Show resolved Hide resolved
@marcelwa
Copy link
Collaborator Author

@Drewniok this PR is now feature-complete. If you find some time, I would appreciate your input. It's not urgent.

  • The new CLI commands quickexact, quicksim, temp, and opdom are available.
  • The CLI commands read and print have been updated to support read --sqd and print -c for CDS.
  • Furthermore, I made some small changes to critical_temperature and its tests in order to streamline the code.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

cli/cmd/simulation/quickexact.hpp Show resolved Hide resolved
cli/cmd/simulation/quicksim.hpp Show resolved Hide resolved
Copy link
Collaborator

@Drewniok Drewniok left a comment

Choose a reason for hiding this comment

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

Really cool! Many thanks 🙏

@marcelwa marcelwa merged commit 2e3446c into main Dec 15, 2023
58 checks passed
@marcelwa marcelwa deleted the compile-time-flows branch December 15, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Concerning the command-line interface (CLI) enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants