aws-cqc / aws-cqc/DeviceLayout.jl
Allow BasicCompositeComponent to store a custom hook map
- Dominant language
- Julia
- Stars
- 67
- Forks
- 14
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 21
Description
For a `BasicComponent`, the user provides an explicit `geometry::CoordinateSystem` and `hooks::NamedTuple` rather than defining `_geometry!` and `hooks` methods.
The `BasicCompositeComponent` is meant to be analogous for composite components. Ordinarily, a composite component defines a method to build a graph and a method to map externally-facing hooks to subcomponent hooks (`_graph!` and `map_hooks`, plus a `_build_subcomponents` method that does any reparameterization). The `BasicCompositeComponent` replaces the first method definition with an explicit graph, but just uses the fallback for mapping hooks (giving hook names prefixed by subcomponent index like `:_1_`). Would be simple to add a `hook_map` field for a little more customization.
While I'm thinking about it, `BasicComponent` should probably have an arbitrary `parameters::NamedTuple` field, like `GDSComponent` does. (Arguably `BasicCompositeComponent` could have one too, with its own `build_components` method? But then you're getting into territory where you should just be defining your own composite component type, so I'm not sure I want to encourage that.)
Contributor guide
Research direction
Start by locating the definitions of BasicComponent and BasicCompositeComponent, then read how their geometry, hooks, graph, and parameter data are currently represented. Determine the intended scope of the hook_map change and whether the proposed BasicComponent parameters field should be included; done means the agreed API supports the requested customization and its behavior is covered by the project’s existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100