Physics-aware differentiable design of magnetically actuated kirigami for shape morphing

Shape morphing that transforms morphologies in response to stimuli is crucial for future multifunctional systems. While kirigami holds great promise in enhancing shape-morphing, existing designs primarily focus on kinematics and overlook the underlying physics. This study introduces a differentiable inverse design framework that considers the physical interplay between geometry, materials, and stimuli of active kirigami, made by soft material embedded with magnetic particles, to realize target shape-morphing upon magnetic excitation. We achieve this by combining differentiable kinematics and energy models into a constrained optimization, simultaneously designing the cuts and magnetization orientations to ensure kinematic and physical feasibility. Complex kirigami designs are obtained automatically with unparalleled efficiency, which can be remotely controlled to morph into intricate target shapes and even multiple states. The proposed framework can be extended to accommodate various active systems, bridging geometry and physics to push the frontiers in shape-morphing applications, like flexible electronics and minimally invasive surgery.


Introduction
Shape-morphing systems that can undergo morphological changes in response to external stimuli have great potential for a wide range of applications, such as soft robotics [1][2][3][4][5][6][7] , minimally invasive surgery [8][9][10] , and flexible electronics 11,12 .These shape morphing applications typically require non-uniform and large deformation in the structures to realize intricate functional shapes, which is challenging to realize with ordinary materials.In contrast, inspired by the ancient art of paper cutting, kirigami introduces cuts to relax the continuum constraints in materials, allowing for significant spatial variation of the deformation within.
Despite its great potential, kirigami has been largely limited to a few regular periodic or heuristic cuttings developed through trial-and-error and ad hoc approaches 13 .Most research primarily focuses on forward kinematic analysis, fixing the cutting patterns with hand-pick parameters.There is a lack of effective inverse design methods that can efficiently explore the vast design space while satisfying the complex constraints associated with cuttings.Some studies have explored parameter optimization in a periodic kirigami, often involving parameter sweeping to screen desired parameters, such as widths of hinges and panel aspect ratios 24,25 .However, due to the restrictions imposed by periodicity and parametric space, the full potential of kirigami in shape morphing remains largely untapped.A recent inverse design framework has successfully relaxed the periodicity requirement in kirigami, creating optimized aperiodic cutting patterns to realize versatile deployed shapes 26 .This approach has been further extended to encompass various types of kirigami, addressing complex kinematic requirements such as compact reconfigurable designs 27 , and accommodating different topologies 28 .However, to the best of the authors' knowledge, existing inverse design processes for shape-morphing kirigami, including the aforementioned recent works, primarily focus on the design of geometries or kinematics but do not explicitly consider the physics 13,[29][30][31] .By physics, we mean the fundamental laws and principles underlying the forces, energy, and other physical interactions governing the deployment or actuation process.Consequently, most existing kirigami designs fail to address the essential physical feasibility and rely on simple mechanical manipulation (mostly by hand) to drive the shape-morphing process, which is impractical in real applications.While there are a few physics-aware exceptions, they only consider physics in post-analysis after completing the design process 26,27,32 , focus on periodic and unit-cell designs via brute-force parameter sweeping and heuristic optimizers 16,19,20,22,23,33 , or assemble precomputed unit cells with weak interactions [34][35][36][37][38] .As a result, existing methods either cannot ensure physical equilibrium in the resulting designs or become rather restrictive in terms of design complexity and applicability.The absence of an effective and flexible physics-aware inverse design framework hampers the integration of kirigami with stimuli-responsive materials to realize more complex and practical applications, which is the very issue we aim to address in this work.
The key barrier in designing physics-aware active kirigami is to incorporate the complex interplay between geometry, materials, and external stimuli in an iterative, automated design process.Furthermore, simulating the deployment process is often time-consuming and non-differentiable, without the analytical gradient of the design objective required to effectively navigate in a high-dimensional design space.This study addresses these issues and demonstrates how to explicitly incorporate both geometry and physics into kirigami design for active shape morphing via differentiable modeling and gradient-based optimization.It aims to fill the existing knowledge gap in physics-aware kirigami design, enabling a better understanding of the design principles and efficient optimization processes.We focus on magnetically actuated kirigami made of hard-magnetic soft material as the illustrative case.Magnetic actuation offers the advantage of performing tasks remotely in confined and enclosed spaces, making it particularly valuable for many shapemorphing applications mentioned earlier.It has demonstrated promise in fields such as surgical robotics and flexible electronics 39 , where precise control, intricate behaviors, and rapid customization are required.
Given the practical significance of these applications, the need for an improved design approach that considers physics while maintaining high flexibility and efficiency becomes even more critical.Meanwhile, magnetic actuation presents unique challenges due to its position-and deformation-dependent magnetic potential [39][40][41] .It involves complex interactions between geometries, materials, and external stimuli, which are also encountered in other types of actuation such as thermal load 23 , humidity 42 , and pH 8 .Therefore, the design principles and insights obtained in this study have broad applicability across various designs actuated by different physics.Specifically, we propose an energy-based differentiable inverse design framework for magnetically actuated kirigami, explicitly incorporating physics into the design process.This approach allows simultaneous optimization of geometry and active materials to achieve complex shape-morphing behaviors, including multi-state designs that can freely transform into different stable configurations under different magnetic stimuli.It demonstrates superior efficiency, effectiveness and flexibility in quickly responding to new design scenarios for solutions with both kinematic and physical feasibility, unlocking design possibilities that were previously unachievable.

Physics-aware differentiable design
While our method can be applied to various kirigami patterns, we have chosen to focus on the quadrilateral kirigami pattern for ease of illustration.As illustrated in Fig. 1a, our design process begins with a compact quadrilateral kirigami consisting of a repeating unit cell of four square panels.The panels are connected by hinges at the nodes to enforce mutual kinematic constraints, only allowing each pair of connected panels to counter-rotate and uniformly morph the overall configuration into a squared deployed shape, as shown in Fig. 1b.To achieve a kinematically admissible path between the compact and deployed states, it is important to ensure geometrical compatibility between the panels, as depicted in Fig. 1c.For instance, edges overlapped in the compact state must have equal lengths, and the panel angles around the center node of a compacted unit cell must add up to 2.Beyond ensuring geometrical compatibility, how to actuate the kirigami into its deployed state is also a crucial aspect to consider in real-world applications, which is overlooked in existing designs.In our design, we utilize magnetic torque as the actuation to enable remote and active control of the kirigami.This is achieved by uniformly dispersing hard-magnetic particles with programmed magnetization within the polymer matrix of each panel through a direct ink writing (DIW) printing method 43,44 (See Method for material and printing details), as illustrated in Fig. 1a-c.A uniform magnetic field  =  B of magnitude  and direction  B will then impart distributed magnetic torques in kirigami to achieve shape morphing (Fig1.d).For the ith panel with magnetization vector   =   of magnitude  and direction   , the induced magnetic torque can be computed as where  and   are the thickness and area of the panel, respectively.The positive direction of x-and ycomponents for both  B and   is defined to be aligned with the axes shown in Fig. 1a.The magnetization direction   of each panel should be carefully designed so that the induced magnetic torque can rotate the panel into the desired orientation upon the applied magnetic field.Specifically, the deployed configuration of the kirigami should satisfy the physical equilibrium between magnetic torques and mechanical forces, as shown in Fig. 1d.In a conventional kirigami design without considering the physics, this equilibrium condition is usually not satisfied, and thus the design is often physically infeasible.Our goal is to develop a fully automated inverse design approach, so that for any target deployed shapes, the kirigami cutting and magnetization of each panel can be rapidly obtained to achieve the desired reconfigured shapes after actuation while ensuring both geometrical and physical feasibility.Since periodic cuttings impose significant restrictions on the achievable deployed shapes, we turn to general kirigami designs with aperiodic cuttings.We begin by conformally mapping the deployed configuration of a regular kirigami (Fig. 1b) into the desired target shapes (Fig. 1f) using Schwarz-Christoffel mapping 45 .
The magnetization orientation of each panel is adjusted accordingly by the average angle change of vectors connecting the center and the four nodes.The resulting kirigami design may no longer meet the geometrical compatibility requirements, and the deployed state is usually not in magneto-elastic equilibrium.As a result, although the deployed shape closely approximates the target, it is impossible to retrieve a compact kirigami design that can morph into the deployed shape in a geometrically and physically feasible manner (Fig. 1e).
To address these issues, we conduct a constrained optimization on the mapped deployed state (Fig. 1f) to optimize both the cutting and magnetization orientation for a geometrically and physically feasible deployed state (Fig. 1i), from which the compact design (Fig. 1h) can be easily identified by direct contraction.
It is important to acknowledge that although optimization-based inverse design methods have been proposed in the literature to achieve geometrical compatibility [26][27][28] , on which our method is built, they are unable to incorporate physical equilibrium requirements into the design process.This is due to the complex interactions among the panels and the strong elastic-magnetic coupling, as demonstrated in Fig. 1d.The resulting lack of gradient information of the design objective precludes the use of efficient and effective gradient-based solvers, and the computational cost for multi-physics simulation is prohibitive for iterative design (e.g., a typical genetic-algorithm-based search usually requires thousands of evaluations 33,46 and may take days or even weeks in our case).Furthermore, the compact and deployed states are intertwined to determine the physical equilibrium.The equilibrium is thus design-dependent and changes iteratively throughout the design process.This results in a dynamic optimization problem that is notoriously difficult to solve.To overcome these challenges, we first develop differentiable kinematic (Fig. 1g) and energy models of kirigami (Fig. 1j).Among all kinematically admissible configurations, only the one corresponding to the total energy minimum can achieve physical equilibrium and remain stable.Ideally, we want this minimal-energy configuration to be the designed deployed state so that the kirigami can transform into and retain the target shape under a given stimulus.With the differentiable models, we can easily integrate this minimal-energy requirement into a constrained optimization framework with an analytical gradient to enable automatic and efficient solutions (Supplementary Note S6).
Specifically, assuming an external magnetic field aligns along the vertical direction, to achieve compatible counter-rotation in a four-panel basic cell (Fig. 2a-b), the horizontal components (x-axis) of magnetization in each panel (Fig. 2b) should have the sign indicated in Fig. 2a.Hence, we only need to use the vertical component (y-component)   of a unit magnetization vector to determine the orientation of the magnetization panel, which is combined with the coordinates (  ,   ) of the nodes as the design variables (Fig. 2c).(marked by the yellow triangle).
To ensure the geometrical feasibility of the deployed design, we apply constraints to the edges and angles, as described in Supplementary Note S1 and illustrated in Supplementary Fig. S1a-c.Additionally, we incorporate constraints on the deployed contour to keep it aligned with the target shape (Supplementary Note S1.4 and Supplementary Fig. S1d).An optional constraint is introduced to regularize the shape and aspect ratio of the compact state (Supplementary Note S1.5 and Supplementary Fig. S1e).To prevent overall rigid-body rotation when subjected to external excitation, the kirigami design is constrained to be symmetric along the vertical axis.This symmetry requirement ensures that the kirigami maintains net magnetization to be zero or along the external magnetic field throughout the reconfiguration process.While these geometrical constraints ensure a geometrically feasible compact kirigami (Fig. 2d) can always be retrieved for the design deployed kirigami (Fig. 2f), they do not guarantee a kinematically admissible morphing path between the two states (Fig. 2e).Geometrical frustration can still occur in the kirigami, making it difficult to obtain an analytical energy model.To address this, we add an extra constraint on the angles around each of the rotating hinges (marked in the same color in Fig. 2d-f).Each pair of these angles (red or blue color) should sum up to  and achieve a straight cutting 27 .A kirigami satisfying this constraint is called rigid-deployable.It can be considered as a mechanism with a single degree of freedom (DOF), whose configuration can be fully determined by the deployed angle  as shown in Fig. 2g.
To incorporate physics into the optimization process, we have developed an analytical model to describe the total energy Π t of a given rigid-deployable kirigami, which consists of elastic energy Π e and magnetic energy (potential) Π m , as shown in Fig. 2h.Observing that the panel only has negligible deformation, we assume the panel to be rigid and utilize a modified hyper-elastic beam model to describe the elastic energy in a bending hinge induced by the counter-rotation between a pair of panels, expressed as an analytical function of the rotation angle (see Supplementary Note S4 and Supplementary Fig. S3) 47 .It can be considered an equivalent nonlinear spring shown in Fig. 1j.Then, given a kirigami configuration, we can obtain the total elastic energy Π t from the rotated angles of all the hinges.Meanwhile, the magnetic energy potential Π m is calculated by summing up the potential of all  p panel as Consequently, the total energy can be obtained via which is a function of the deployed angle (Fig. 2h) for a fixed external magnetic field once the kirigami design is given.The stable deployed state thus corresponds to the deployed angle with the lowest total energy (yellow dot in Fig. 2h).It is noted in Fig. 2h that, there is a complicated relation between geometry (deployed angle) and the energies.As a result, when the physics or panel magnetization orientation is not taken into account in the design, the kirigami tends to deviate from physical equilibrium in the intended deployed shape (yellow triangle in Fig. 2h), leading to a deployed shape that differs from the target.
To realize the co-design of geometry and magnetization orientation, we further develop a differentiable kinematic analysis, from which an analytical expression for the total energy, i.e., Π t (), can be obtained to facilitate later simulation and design optimization.Given any change in the deployed angle, we solve for the corresponding kirigami configuration (kinematic analysis) in sequential steps as shown in Fig. 3e, starting from the center panel columns, propagating to its right side, and then obtaining the left side by mirror symmetry.In each step, we iterate nodes in a specific column of panels or voids, and update their locations based on the constraints with preceding nodes.The updating process is composed of a series of analytical transformations   obtained via solving simple geometrical problems (marked by shaded red/blue/purple regions in Fig. 3b), which forms a computational graph for forward analysis (Fig. 3a-b).
Due to the inherent regularity of cutting, each step only involves a limited set of transformation types (indicated by arrows in different colors in Fig. 3).Using chain rules, we can obtain the gradient values of node locations of any nodes by tracing the computational graph backward and multiplying the gradient of basic transformation   in order (Fig. 3c).By sequentially composing the transformations in different steps, we can analytically formulate the updated configuration of the whole kirigami (the last graph in Fig. 3e).
Then, using the chain rule again, we can readily calculate the analytical gradient of any nodal locations with respect to the deployed angle  and initial node locations  0 .It corresponds to a backward subgraph embedded in the forward computational graph (Fig. 3d).By integrating these analytical kinematics into the previous energy model, we can derive analytical expressions for the total energy Π t () and its gradient.A more comprehensive description of the kinematics and energy models is included in Supplementary Note S3 and S5, respectively.axis) and magnitude  = 30 mT.The kirigami is assumed to have a thickness of 0.8 mm, composed of silicone-based resin with 5 μm neodymium-iron-boron (NdFeB) particles embedded, with a shear modulus of 300 kPa, a Poisson's ratio of 0.495, and magnetic moment density of the composite  = 70 kA/m.For ease of illustration and consideration of manufacturability, we choose to stack 3 × 3 four-panel basic cells in the kirigami, connected by cuboid hinges of size 1.2 mm × 1.6 mm × 0.8 mm.We also include the constraint on the compacted state to ensure a square shape.The proposed differentiable inverse design method allows for efficient optimization of the kirigami, taking only a few minutes as opposed to days or even weeks required when using a heuristic optimizer integrated with non-differentiable simulation.The design results are shown in Fig. 4a-b and Supplementary Video S1.
Compared with the regular grid-like cutting in periodic designs (Fig. 1a-b), the optimized cutting is nonuniform, with panels on the outer boundary significantly distorted.Panels that tend to move outwards in the deployment are elongated, e.g., segments centered at the four boundaries, while the panels at the corners are greatly compressed to achieve the circular deployed shape.This is a typical way for kirigami to utilize the discontinuity introduced by the cutting to redistribute the deformation for better shape matching 13 .
Despite the highly non-uniform shapes, panels are still compatible and rigid-deployable, due to the imposed geometrical constraints.The optimized magnetization orientation is also distinct from that in the periodic (Fig. 1a-b) or initial mapped designs (Fig. 1f).In the compact state, the magnetization orientation is more aligned in the opposite direction of the external magnetic field, while in the deployed state, the orientation is closer to the perpendicular direction.This leads to a significant decrease in magnetic potential energy that compensates for the increase in elastic energy during the deployment process, as demonstrated by the energy analysis in Fig. 4e.It means that a larger magnetic torque is induced in the deployed state to counteract the elastic forces and maintain the deployed shape.As a result, the deployed state corresponds to the state of minimal energy in physical equilibrium (Fig. 4 e), in contrast to the unstable target deployed shape in Fig. 2g-h without the magnetization orientation design.To further validate our findings, we conducted experiments on 3D-printed kirigami, as depicted in Fig. 4c-d and Supplementary Video S2.The details for the manufacturing and experiment can be found in the Methods section.From Fig. 4d, it can be observed that the deployed angle is almost the same for simulated and experimental designs.Despite a small discrepancy due to manufacturing errors and frictions, the experimental results overall demonstrate a close agreement with the simulated designs in achieving the desired circular deployed shape.

Shape morphing designs under different magnetic field magnitudes
To investigate the effect of the external magnetic field, we designed another two kirigami structures to achieve the same circular deployed shapes but under different magnitudes of .When subjected to a weaker magnetic field of  = 20 mT, as shown in Fig. 4f-g, the optimized cutting is modified in such a way that the deployed angle is smaller than that in the design for  = 30 mT (Fig. 4b, Supplementary Video S1), resulting in lower elastic energy and thus smaller elastic forces in hinges.Meanwhile, all panels have their magnetization orientation aligned perfectly perpendicular to the external field in the deployed state, maximizing the induced magnetic torque.The reduction in elastic forces resulting from the altered cutting and the increase in magnetic excitation induced by the change in magnetization orientations combine to maintain equilibrium in the same deployed shape, even in a much weaker field.On the other hand, when exposed to a much stronger field with  = 50 mT, the magnetic potential is more than enough to induce torques compensating for the elastic forces.As a result, the optimized design, as shown in Fig. 4h-i and Supplementary Video S1, has more panels with their magnetization orientation aligned with the external magnetic field in the deployed state, leading to a decrease in magnetic potential and torques, and thus maintaining a physically stable deployed state.These findings suggest that the interplay among geometrical cutting, magnetization orientations in the panels, and the magnetic fields plays a crucial role in achieving target deployed shapes in physical equilibrium.Our approach can take into account this interplay and thus enable the co-design of different entities for optimal performance.results corresponding to that in Fig. 4a and 4b, respectively.The transparent red lines mark the configuration of the simulated design in Fig. 4b.e Energy analysis of the designed kirigami shown in Fig. 4a, under the constant field  = 30 mT.The deployed state shown in Fig. 4b corresponds to the lowest energy state marked by the vertical dashed line.Upon the given constant excitation, the compact state will have a higher total energy and will transform to the energy minimum/designed deployed state, as marked by the dashed arrow.f and g show simulated compact and deployed states of optimized kirigami designed for  = 20 mT, respectively.h and i show simulated compact and deployed states of optimized kirigami designed for  = 50 mT, respectively.

Shape morphing designs to achieve various deployed shapes
While many existing designs rely on trial-and-error or heuristic designs, the proposed method offers the flexibility to accommodate direct inverse design for various complex deployed shapes, as shown in Fig. 5 and Supplementary Video S3.In these cases, we use the same upward magnetic field with a magnitude of  = 35 mT.The compact shapes are still constrained to be rectangular, but their aspect ratios are relaxed to be freely changed by the optimization to further increase flexibility.The results demonstrate the success of the proposed method in achieving deployed shapes that precisely match the given targets, even when the target shapes exhibit significant changes in aspect ratios between states (Fig. 5a and 5d) or drastic variations in curvatures (e.g., Fig. 5e, 5f, 5j and 5l).In particular, we perform experiments on the 3D-printed gobletlike design (Fig. 5m and Supplementary Video S4), whose deployed angle and overall deployed state (Fig. 5n) match well with the design target and simulation (Fig. 5l).Similar to our previous designs for a circular deployed shape, the optimized cuttings in all these cases here lead to non-uniform panels.Panels that expand outward in the deployed state are elongated or enlarged, while panels that contract inward are compressed.
This non-uniformity becomes more pronounced when there is a substantial change in aspect ratio (Fig. 5a and 5d) or boundary curvatures (e.g., Fig. 5e, 5f, 5j, and 5l) during deployment, enabling spatially varying deformation for target shape morphing.and deployed states of optimized kirigami with a heart-like deployed shape, respectively.c and f are compact and deployed states of optimized kirigami with a dog-like deployed shape, respectively.g and h are compact and deployed states of optimized kirigami with a rainbow-like deployed shape, respectively.i and j are compact and deployed states of optimized kirigami with an acorn-like deployed shape, respectively.k and l are compact and deployed states of optimized kirigami with a goblet-like deployed shape, respectively.m and n are experimental results corresponding to Fig. 5k and 5l, respectively.The transparent red lines mark the configuration of the simulated design in Fig. 5l.
It is interesting to note that a larger change in shapes/deployed angles between the two states results in panels having magnetization in deployed states more perpendicular to the external fields (as seen in Fig. 5f and 5l).In the same deployed kirigami, panels with smaller sizes or larger rotation angles have magnetization orientations more perpendicular to the external field, while panels with larger sizes or smaller rotation angles have magnetization orientations more aligned with the external field.For instance, in Fig. 5l, the lower half panels have smaller sizes compared to panels in the upper half, which have magnetization more perpendicular to the external field.Consequently, both parts contribute similar magnitudes of magnetic torques to balance the competing magnetic and elastic forces.These observations underscore the intimate connection between designs on magnetization and geometry in achieving physically stable deployed states, further validating the effectiveness of our proposed method.

Two-way contractible designs with target deployed shapes
All the results discussed thus far have focused on designs that transform only between a single compact state and a deployed state.However, our proposed method can also design kirigami that morphs into The results depicted in Fig. 6a and 6d demonstrate the successful attainment of the target shapes in the zero states, which transform into different compact states upon exposure to magnetic fields in opposite directions (Supplementary Video S5 and S7).These two-way contractible behaviors align well with real physical experiments shown in Fig. 6b and 6e, and Supplementary Video S6 and S8.In the circular design, all the magnetization orientations are almost perpendicular to the external magnetic field in the zero state, resulting in a nearly zero magnetic potential (Fig. 6c).Additionally, the cutting is designed in such a way that the rotation angle of each panel is almost identical in both compact states but with opposite signs.Consequently, the energy curves (Fig. 6c) exhibit approximate symmetry with respect to the deployed angle of the zero state, with the left and right halves corresponding to constant negative and positive fields respectively.It forms two distinct energy-decreasing paths leading to the energy minima corresponding to the two compact states.In contrast, the energy curves for the goblet-shaped design display evident asymmetry (Fig. 6f), with a larger energy change during the transition from the zero state to the negative state compared to the transition from the zero state to the positive state.As a result, both compact states can achieve physical equilibrium with the lowest total energy, but under different constant stimuli.It should be noted that there is a sudden change in the total energy in both Fig. 6c and 6f in the zero state, which is due to the change of sign for the magnetic potentials when switching the direction of external fields.
With this two-way contractible design, we have the ability to control the temporal series of external stimuli in freely transferring between different states and realizing a desired sequence of shapes as shown in Fig. 6gh, Supplementary Video S5-S8.Specifically, in Fig. 6g, we start from a zero state without actuation, then impose a negative field of 35 mT to reach the negative state, and finally switch the actuation direction to get a positive field of 35 mT to realize the positive state.It is interesting to note that the kirigami exhibits an asynchronous morphing process from the negative to the positive state, i.e., starting from the left and then propagating to the right.This might be due to asymmetric manufacturing errors and friction forces.
Similarly, in Fig. 6h, we can transform the kirigami to achieve positive, zero, and negative states in sequence by sequentially imposing a positive field of 35 mT, a zero field, and then a negative field of 35 mT.This capability opens up possibilities for various applications, such as wave-guiding control, locomotion in soft robotics, and mechanical computing.

Conclusion
In this study, we have proposed a differentiable design method for magneto-responsive kirigami in achieving shape morphing.Unlike existing methods that focus solely on kinematics in design followed by post-analysis, the proposed method explicitly integrates physics into the design loop to ensure both the kinematic and physical feasibility of the morphing process.It is built on newly-developed sequential kinematic analysis and analytical energy models to capture the coupling between active materials, geometry, and stimuli.Leveraging the differentiability of our models, we formulate the design as a constrained optimization problem, simultaneously optimizing both cutting and magnetization orientations using gradient-based methods.By integrating physics into the design loop, we successfully obtain active kirigami that can be remotely actuated to morph into a wide range of complex target shapes and allow free transition between multiple stable states via two-way contractible designs, validated through both simulations and physical experiments.It significantly reduces the computational cost of the design process (from days or weeks to minutes), demonstrating superior effectiveness and flexibility in responding to new design scenarios.Our findings shed light on the crucial role of the interplay between active materials, geometry, and stimuli in achieving physically stable morphologies.Hinged on the general energy principles underlying various physics, the analytical models and energy-based optimization framework are applicable for stimuli other than the magnetic field, and active systems beyond kirigami, such as origami 52 , lattice 53,54 , tensegrity systems 55 , and magnetic soft continuum robots 56 .It bridges the gap between geometry and physics in active system designs, paving the way for innovative applications in flexible electronics, minimally invasive medical treatments, and optical manipulation.

Methods
Ink fabrication and preparation for direct ink writing (DIW) The magnetic kirigami patterns are fabricated through the DIW method with ink composited of silicone- with extrusion pressure being 200 kPa.The printed patterns are cured at 80°C for 36 h.

Experiment setup for magnetic actuation
The magnetic kirigami patterns are actuated under a 1D magnetic field generated by a set of single-axis Helmholtz coils.To prevent out-of-plane deformation, magnetic kirigami patterns are covered by a supported acrylic plate.

Simulation and optimization
Both energy-based simulation and iterative kirigami optimization are realized by sequential quadratic programming method, via the built-in function (fmincon) of commercial software MATLAB R2022b (The MathWorks, Inc).The commercial software Abaqus 2022 (Dassault Systèmes) is used for the finite element analysis of the kirigami to validate the proposed energy-based simulation method.
More details about simulation and optimization are provided in the Supplementary Information.

Fig. 1 :a
Fig. 1: Schematic diagram of the physics-aware differentiable design of kirigami.

Fig. 4 :
Fig. 4: Optimized design results to achieve a circular deployed shape.

based resin with 5
μm neodymium-iron-boron (NdFeB) particles (Magnequench Co., Ltd) embedded.The ink is fabricated as follows.First, SE1700 base (Dow Corning Corp.) and Ecoflex 00-30 Part B (Smoothon Inc.) with a volume ratio of 1:2 are mixed together at 2000 rpm for 1 min using a centrifugal mixer (AR-100, Thinky Inc.).Then, NdFeB (77.5 vol% to SE1700 base) is added to the mixture and mixed at 2000 rpm for 2 min and defoamed at 2200 rpm for 3 min.Next, SE 1700 curing agent (10 vol% to SE1700 base) is added and mixed at 2000 rpm for 1 min.The ink is transferred to a 10 mL syringe (Nordson EFD) and defoamed at 2200 rpm for 3 min and subsequently mixed at 2000 rpm for 2 min.The ink is then magnetized by a homemade magnetizer under a 1.5 T impulse magnetic field.The syringe is mounted to a customized gantry 3D printer (Aerotech) and a printing nozzle of 410 μm is utilized.CADFusion (Aerotech) is used to convert magnetic kirigami pattern drawings to G-codes for printing.The printing speed is set to 5 mm⋅s-1