Skip to content

Conversation

Hespe
Copy link
Member

@Hespe Hespe commented Aug 5, 2025

Description

CustomTransferMap currently does only support linear tracking. This PR adds support for second-order CustomTransferMaps.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist

  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have reformatted the code and checked that formatting passes (required).
  • I have have fixed all issues found by flake8 (required).
  • I have ensured that all pytest tests pass (required).
  • I have run pytest on a machine with a CUDA GPU and made sure all tests pass (required).
  • I have checked that the documentation builds (required).

Note: We are using a maximum length of 88 characters per line.

@Hespe Hespe self-assigned this Aug 5, 2025
@Hespe Hespe added the enhancement New feature or request label Aug 5, 2025
@Hespe Hespe linked an issue Aug 5, 2025 that may be closed by this pull request
@Hespe Hespe changed the title 516 second order customtransfermap Add support for second-order tracking to CustomTransferMap Aug 5, 2025
@Hespe Hespe marked this pull request as ready for review August 5, 2025 13:20
@Hespe
Copy link
Member Author

Hespe commented Aug 5, 2025

One thing that could lead to trouble down the road: predefined_transfer_map is interpreted differently based on how tracking_method is set. This should be fine during construction is potentially confusing if tracking_method is changed later, i.e. for the whole lattice at once.

An alternative would be to have two flags to set the tracking method. The current, public tracking_method to determine the tracking strategie used and a second private flag that determines how predefined_tracking_map is interpreted. Due to broadcasting, we cannot just check if predefined_transfer_map is three dimensional to distinguish these two modes.

So, essentially, I think changing tracking_method is confusing in the current implementation but its the most straightforward one. Maybe its worth to make it slightly more involved to prevent misleading tracking.

@Hespe Hespe requested a review from jank324 August 5, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for second-order tracking to CustomTransferMap
1 participant