aws-cqc/DeviceLayout.jl

Allow BasicCompositeComponent to store a custom hook map

Aperta

#19 aperta il 27 feb 2025

 (0 commenti) (0 reazioni) (0 assegnatari)Julia (14 fork)auto 404
enhancementgood first issue

Metriche repository

Star
 (67 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.)

Guida contributor