This is a visual quantum circuit builder. You can drag and drop quantum gates (operators) onto a grid to construct quantum circuits. Some gates can be composed of other elementary gates. Here, CG is composed of four Hadamard gates in a certain configuration.
CG is a custom gate composed of four Hadamard gates as described in the components field in the operator definition.
Implement an XRay View for the custom gate that expands it to show its components in a grid layout.
The expanded view should be toggled by clicking on the Eye () icon that appears when you hover over the custom gate.
Add support for gates of varying width. When a custom gate is expanded, it can appear to span multiple columns. Ensure that the following conditions are met:

