Diffractive magic cube network with super-high capacity enabled by mechanical reconfiguration

Domain: physics
Published: 2026-01-11
Editorial outcome: major_revision

Abstract
Free-space wavefront manipulation devices have emerged as powerful platforms for advanced optical information systems. In response to the challenges posed by the exponential growth of optical information, optical multiplexing and dynamic reconfigurable devices are being actively explored to the enhance system capacity. Among them, coarse-grained mechanically reconfigurable mechanism offers a cost-effective and low-complexity approach for capacity enhancement. However, the channel numbers achieved in current studies are insufficient for practical applications because of inadequate mechanical transformations and suboptimal optimization models. In this article, a diffractive magic cube network (DMCN) is proposed to advance the multiplexing capacity of mechanically reconfigurable system. We utilized the diffractive deep neural network (D2NN) model to jointly optimize the subset of channels generated by the combination of three mechanical operations, permutation, translation, and rotation. The 144-channel holograms, 108-channel single/double focus, 60-channel single/multi-mode OAM beam generation were experimentally demonstrated using diffractive optical elements (DOEs). An equivalent connectivity law was formulated to improve model scalability. Our strategy not only provides a novel paradigm to improve system capacity to super-high level with low crosstalk, but also paves the way for new advancements in optical storage, computing, communication, and photolithography.

Introduction
Free-space wavefront manipulation devices with different modulation pixel scales, such as diffractive optical elements (DOEs), metasurfaces, and liquid crystals (LCs), have provided powerful platforms for the development of novel optical information systems, including holography, flat lenses, orbital angular momentum (OAM) beam generation, optical computing etc. The information capacity of these systems need to be continually enhanced to accommodate the ever-growing demands of massive information processing. In recent years, extensive studies on optical multiplexing strategies have been conducted to enhance system capacity. Early efforts successfully develop independent multiplexing channels leveraging wavelength, polarization, OAM, and transmission direction of light but these approaches provide limited channels (i.e., less than 4) due to the constraints on channel independence. Fortunately, Xiong et al. achieved 11 non-orthogonal polarization multiplexing channels by introducing correlated noise into the least squares algorithm. This breakthrough overcomes the design limitations of independent channels and demonstrates the possibility of multiplexing using correlated channels. Inspired by this work, an increasing number of studies have begun to explore the non-orthogonal polarization channels for multifunctional multiplexing. However, the correlation between multiple channels increases crosstalk, making the device parameter design more challenging. Diffractive deep neural network (D2NN), a data-driven deep learning optical network is frequently used in these researches to address the obstacle. The state-of-the-art work reported by Wang et al. utilized D2NN to jointly optimize 55 non-orthogonal polarization channels obtained by extending the dimension of the Jones matrix, achieving ultra high-capacity holography.

Dynamic wavefront manipulation devices with reconfigurable or reprogrammable features are also widely adopted to enhance the system capacity. Common strategies for dynamically controlling the optical response of materials involve introducing the external stimuli, such as voltage, light, and temperature. These methods incorporate extra components, including PIN diodes, LCs, photodiodes, and VO2, into the devices, thereby increasing system complexity and energy consumption. Instead, mechanically reconfigurable devices comprising multiple modulation layers offer a cost-effective and low-complexity solution for dynamic manipulation of light. These systems flexibly alter the relative spatial configuration of multiple modulation layers through operations such as rotation and insertion, thereby enabling coarse-grained reconstruction of the manipulation process. Some studies designed compact cascaded devices using physics-inspired formulations or gradient descent algorithms. With extremely short interlayer spacing, interlayer diffraction becomes negligible, and the multiple modulation layers effectively function as a single layer. This not only enhances inter-channel correlation but also significantly restricts the mechanical degrees of freedom (DOF). Leveraging the D2NN framework, Fan et al. proposed the TDNN with increased interlayer spacing, ensuring sufficient diffractive connectivity between layers. The DOF in rotational reconfiguration were effectively enhanced through the design of circular rotation interpolation model. However, the increase in channel count unavoidably reduces the rotation step size, which in turn accelerates the growth of inter-channel correlation and interpolation-related numerical errors. And the circular rotation model confines the TDNN to PB phase implementations. These limitations hinder the scalability and portability of the TDNN. Overall, the experimentally achieved channel numbers in current studies remain limited (i.e., ≤ 20) due to inadequate mechanical transformations and ineffective optimization models, which are far from meeting the demands of practical applications. The increased channel number also reduces the signal-to-noise ratio (SNR), and a trade-off between them has yet to be well established. Therefore, the ultimate limit for this type of coarse-grained reconfigurable mechanisms remains to be explored.

In this article, we introduce a diffractive magic cube network (DMCN) consisting of three diffractive layers, elevating the multiplexing capacity of mechanically reconfigurable mechanisms to a super-high level. Our DMCN constructed thousands of non-independent potential channels through the combination of three coarse-grained mechanical operations: permutation, translation, and rotation. We carefully selected the subsets of these channels and employed the D2NN model to optimize the transmission phases of the DMCN, achieving 144-channel holograms (PCC~0.99), 108-channel single/double focus (PSNR~42.9dB), and 60-channel single/multi-mode OAM beam (CC~1). An equivalent connectivity law for the DMCN model was theoretically derived to improve its scalability. The interrelationships among the layer width, field of view (FOV) width, channel count and SNR were also analyzed in detail, revealing that an increased layer-to-FOV width ratio enhances channel capacity and SNR. We experimentally validated the numerical model using multi-layer DOEs fabricated via grayscale photolithography, and observed agreement between measurements and simulations. Since the DMCN was implemented by the simplest phase-modulated cells, it can easily be integrated with techniques such as polarization multiplexing and wavelength multiplexing to further enhance channel count. Our strategy provides a novel paradigm for enhancing system capacity, which involves constructing a large amount of non-independent channels across multiple dimensions and subsequently employing D2NN model for joint optimization. This work will provide new possibilities for the development of optical storage, display, encryption, photolithography and optical communications.

Results
The super-high capacity and optimization of DMCN
The system schematic of our DMCN is shown in Fig. 1. We employed the forward propagation model of D2NN to describe the wave transfer procedure in the system. Specifically, the incident light is first modulated by the diffractive layer, and the resulting modulated wavefront then acts as a secondary wave source, radiating waves to the adjacent layer. This process is repeated three times, ultimately forming the target wavefield at the output FOV. A corresponding system transfer matrix Ac (see Methods for details) was also derived to help demonstrate the reconfigurable mechanism of DMCN. Its parameters can be altered by three types of coarse-grained mechanical operations, enabling the generation of potential channels. Permutation operations change the order of the layers (e.g., ABC!BAC), thereby altering the positions of the modulation coefficient matrices TA, TB, TC in equation e:g:, T1=TA, T2=TB, T3=TC ! T1=TB, T2=TA, T3=TC: Rotation operations applied to the second and third layers modify the rotation angles of the matrices of T2 and T3, denoted as Ω1 and Ω2: Translation operations adjust the layer distances d1, d2, d3 through shifting the second and third layers. Notably, the total longitudinal length, d1+d2+d3, is designed as a const, allowing the optical information stored in the different mechanical states of the DMCN to be excited and directed to the fixed output FOV under the illumination of incident plane wave J.

Figure 2b illustrates the combination manners of aforementioned mechanical operations, which endow the DMCN with thousands of potential channels. The full permutations (i.e., P3=6) and partial permutations (i.e., P2+P1=9) of the three modulation layers generated 15 channels. The second and third layers of DMCN can be respectively rotated to four specific angles: 0°, 90°, 180°, and 270°, resulting in another 16 possible combinations. Lastly, the total longitudinal length of 60 cm was discretized into 60 intervals, each measuring 1 cm. The intervals allocated to d1 and d2 were equal to facilitate the experiment, which produced 29 possible configurations of interlayer distances for translation operations. These channels were combined to form a total of 4179 channels. It is not noteworthy that these channels are not independent, as they share the trainable parameters TA, TB, TC: Any updates to these matrices simultaneously affect the transfer functions of all channels. To minimize crosstalk among these correlated channels as much as possible, we employed the back propagation gradient descent algorithm of the D2NN model for joint optimization, as illustrated in Fig. 2a. The transfer matrix of each channel, constructed by zero-initialized trainable coefficients, firstly transformed the input plane wave to output wavefield. Subsequently, the loss function of each channel computed the error between ground truth and field in output FOV. During each iteration, losses of all channels to be optimized were summed for parameter updates through gradient descent. To implement DMCN models with different functionalities, we adopt holographic images, focal spots, and complex vortex fields as optimization targets, and train the models using the mean squared error (MSE) loss function defined in the Methods part. The limited number of parameters in DMCN models makes it impractical to optimize thousands of channels simultaneously. Therefore, the channel subsets were carefully selected according to the channel selection strategy in Supplementary Note 4 to generate 144-channel holograms, 108-channel single/double focus, 60-channel single/multi-mode OAM beam, respectively.

Results of reconfigurable holography
Multi-channel holography was initially taken as an example to demonstrate the effectiveness of the proposed mechanically reconfigurable strategy. By leveraging the single type of mechanical transformation, the pairwise combinations of transformations, and the integration of three transformations, the channel capacity of DMCN holography was progressively enhanced from 15 to 144. An MSE loss function with an efficiency regularization term was employed during DMCN training to optimize image quality while controlling system efficiency, and the target fields of different channels are confined within the same FOV on the same plane. The ground truth of the quick draw, expression, and letter images used for training is presented in the Supplementary Fig. 34. To assess the hologram quality, the Pearson correlation coefficient (PCC) was used to evaluate the similarity between the output holograms and ground truth images, while the peak signal-to-noise ratio (PSNR) was used to analyze the noise intensity in the holograms. Detailed definitions of these metrics are provided in the Methods part. Supplementary Fig. 1 presents simulation results of multi-channel quick draw holograms respectively achieved by translation (16 channels), permutation (15 channels), and rotation (16 channels). The PCCs of these holograms are 1, indicating negligible differences from the target images. Supplementary Fig. 2 shows the simulation results of 18-channel, 24-channel and 48-channel expression holography obtained from pairwise combinations of the three mechanical configurations in Fig. 2b. To balance the trade-off between image quality and system efficiency caused by the iterative spatial filtering process in the DMCN model (see Supplementary Note 2 for details), we adopted a strategy of reducing imaging efficiency to maintain high image clarity as the channel count increases. Therefore, the target optimization efficiency ηTh was respectively set to 18%, 16%, and 12% when training these models. Both the holographic images and evaluation metrics (PCC~0.99, PSNR~19.9dB) confirm that high image quality is maintained despite the increased number of channels. The 144-channel letter holography model was realized by fully integrating three types of mechanical configurations, as illustrated in Fig. 2b. The detailed mechanical parameters for all 144 channels are provided in Supplementary Excel. The model features a layer width of 400 pixels and a FOV width of 200 pixels, with each pixel measures 9μm*9μm. To keep high image quality, the value of ηTh was further reduced to 4.5%. Figure 2c presents the phase profiles of the well-trained DMCN model. To implement the phase modulation layers of the model, we fabricated DOEs composed of 16-level photoresist relief structures through grayscale photolithography (see Methods for details). A partial scanning electron microscope (SEM) view of the sample is shown in Fig. 2c. We further fabricated three slots to support the plug-and-play integration of DOE layers, enabling the implementation of the three mechanical transformations. Figure 2d presents the schematic diagram of the experimental optical path. The incident 532nm laser beam was sequentially modulated by the three DOE layers and then captured by the camera at the imaging plane.

Figure 2e presents the simulated and experimental holograms of the first 6 channels together with 14 representative channels ranging from low to high PSNR. The results of remaining channels are provided in Supplementary Fig. 4 and Supplementary Movie 1. In the simulations, the outputs of the low-PSNR channels exhibit most background noise in the central region. As the PSNR increases, the noise level decreases accordingly. Channel 46 exhibits two unexpected holes, resulting in the lowest PSNR of 19.94dB. In contrast, the simplest character, ‘II’, achieves the highest PSNR of 27.62dB. The PSNR of the experimental results is consistently 4~5dB lower than that of the corresponding simulations. Despite the degradation in image quality, the letters remain clearly identifiable. Figure 2f, g show the simulated and experimental metric histograms for all 144 channels. Simulated images attain an average PCC of 0.99 and a mean PSNR of 23.2dB, demonstrating high imaging fidelity, while the experimental results yield a mean PCC of 0.91 and an average PSNR of 18.6dB. Nonetheless, the distribution trends of the simulated and experimental metrics remain highly consistent. The correlation coefficient matrices from simulations and experiments are provided in Supplementary Fig. 4, with the average inter-channel correlations being 0.21 and 0.23, respectively, demonstrating low crosstalk. Furthermore, the channel capacity of the DMCN-based holography system can be further increased at the expense of image quality or by increasing the ratio between layer width and FOV width. The detailed trade-offs among PSNR, channel count, layer width, and FOV width ratio are analyzed in the section “Model Scalability of DMCN”. Our model is also capable of generating 144-channel grayscale holograms from the CIFAR-10 dataset (PCC~0.93, PSNR~19.8dB, η~4.4%), as shown in Supplementary Fig. 33. These reconfigurable holography results conclusively underscore the super-high information capacity of our DMCN.

Results of reconfigurable single/double focus
To further explore the application potential of our DMCN model, we also optimized it to achieve multi-channel single/double focus. In this scenario, both the model layer width and the FOV width were set to 600 pixels, with each pixel having a side length of 12.5μm. During model training, the same loss function used in DMCN holography was utilized and ηTh was set to 4%. The optimization target was set as focused patterns consisting of small squares centered around the target focal points. The side length of these squares could determine the full width at half maximum (FWHM) of the output Airy disks. On one hand, an excessively large side length will cause the output wavefield of the DMCN to fail in properly focusing on the target region, leading to energy dispersion. On the other hand, a too small side length will result in focal points with overly narrow FWHMs, thereby reducing focusing efficiency. Therefore, a single-layer meta-lens was chosen as a benchmark to determine the optimal side length of the target squares. Supplementary Fig. 5 shows the phase profile of a meta-lens with the same layer width and sampling interval as the DMCN. Its focal length matches the longitudinal length of the DMCN, with a numerical aperture of 0.0062. The FWHM of its focal point is 36.25μm, approximately 3 sampling intervals. Thus, the side length of our focused squares was set to 3 pixels. To avoid excessively low focusing efficiency, a total of 108 channels were selected for joint optimization. These channels are derived from the combination of the first six rotation channels and the other two types of channels shown in Fig. 2b and their mechanical parameters are detailed in Supplementary Excel. Among them, 81 channels were allocated for single-focus, 27 for dual-focus. The target focusing patterns for these configurations are presented in Supplementary Fig. 35.

The phase profiles of the well-trained focus model are shown in Supplementary Fig. 6, exhibiting a more scattered distribution compared to those of the holography model. Figure 3a presents the simulated and experimental results of 6 single-focus channels and 4 dual-focus channels, selected from the total of 108 channels. Both the simulated and experimental outputs of each channel are well focused within their respective target focal regions, exhibiting high channel isolation with no observable crosstalk. Supplementary Figs. 7–14 and Supplementary Movie 2 show the focus points of other channels. To provide a more detailed illustration of the focusing results, the output fields of channels 39, 40, 51, 52, 82 and 88 are represented by their one-dimensional horizontal profiles and two-dimensional cross-sections at the focal height. Figure 3b and Supplementary Fig. 15 present the one-dimensional profiles from the experiments and simulations, respectively. The one-dimensional curves all exhibit a maximum at the target focal point and rapidly decay to near zero as the distance from the maximum increases. To evaluate the crosstalk between channels, we defined (See Supplementary Fig. 15 for detailed definition) and calculated the simulation isolation ratios for four single-focus channels, which are 62.5, 90.9, 58.8, and 76.9, respectively, indicating low energy leakage. The positional error of the maxima between the experimental and simulated profiles is within 8.3μm, smaller than the side length of a DOE pixel. The simulated FWHMs are consistently 33.3μm, while the experimental FWHM ranges from 29.2μm to 41.6μm. Additionally, the experimental results of channel 88 exhibit a slight unevenness in the intensities of the two focal spots. The simulated 2D field intensity distributions in Fig. 3c demonstrate that the depth of focus (DOF) for these six channels is approximately 4mm, corresponding to about 120 times the FWHM. Figure 3d, e present the histograms of evaluation metrics for both simulated and experimental results. In simulations, the mean PSNR is 42.91dB. The FWHMs of all focal points are 33.3μm, slightly smaller than the predesigned side length of the square patterns. For focusing efficiency, we defined the focusing energy as the total energy within three times the FWHM of the focal point and calculated an average efficiency of 3% across 108 channels. For the experiments, the mean PSNR is 42.76dB and the FWHM centers around 35.9μm. Experimental errors cause the metric distribution of the 108 channels to be more dispersed compared to the simulation results.

Results of reconfigurable single/multi-mode OAM beam generation
For multi-channel holography and focusing functionalities, the DMCN utilizes mechanical transformations to dynamically manipulate the intensity of output field. To exploit its capability of complex field manipulation, we further employed the DMCN to generate single/multi-mode OAM beams. The target single-mode OAM beams were set as Laguerre-Gaussian beams, while the target multi-mode OAM beams were formed by the superposition of multiple orders of OAM beams, which can enhance the parallelism and capacity of communication systems. The waists of the OAM beams were all set to 140μm, and the complex light fields at the waist planes were taken as the ground truth. All target fields are also defined in the same FOV. The DMCN requires simultaneous optimization of both the amplitude and phase of the output field to achieve complex field manipulation, which introduces an additional phase dimension compared to multi-channel holography and focusing functionalities. Consequently, the number of reconfigurable channels was reduced to 60, approximately half of the aforementioned configurations. Among these 60 channels, 51 were allocated for generating single-mode OAM beams with orders ranging from −25 to 25, while the remaining 9 were designated for producing multi-mode OAM beams formed by combining selected orders of the 51 energy-normalized beams. Specifically, the target multi-mode OAM beam of the channel 52 includes all orders of OAM beams from −25 to 25. Channels 53-56 produce beams formed by the superposition of orders −25 to −16, −15 to −6, −5 to 4, and 5 to 14, respectively. Channels 57-60 correspond to beams formed by selecting one beam every 2, 3, 4, and 5 orders from the −25 to 25 range. The optimization targets of these channels are shown in Supplementary Fig. 36. The DMCN model was trained using the same loss function as described above, with the output field in the loss function now represented as a complex field. The layer width of DMCN was set to 600 pixels and the side length of each pixel was 12.5μm. To improve the purity of the OAM components in the output fields, the FOV width was reduced to 130 pixels and the efficiency hyperparameter ηTh was lowered to 3.5%.

The phase profiles of the OAM model are shown in Supplementary Fig. 6, characterized by spiral fringe textures. Figure 4a presents the simulated intensity and phase profiles of six single-mode and four multi-mode OAM beams selected from the 60 generated channels. The order of the single-mode OAM beams in channels 1, 6, 11, 36, 41, 46 are respectively −25, −20, −15, 10, 15, 20. As the order of the OAM beam rises, both the radius of intensity rings and the tangential periodicity of phase profiles expand. The direction of the tangential phase gradient reverses when the sign of the order is inverted. Multi-mode OAM beams across four channels display distinct intensity and phase profiles, varying with their constituent orders. Figure 4b shows the intensity profiles and interference patterns of the experimentally generated single-mode OAM beams. The size of the generated donut-shaped OAM beams matches that of the simulated beams, but the intensity distributions exhibit slight non-uniformities. The interference patterns were produced by removing the beam block in Fig. 2d to construct the interference path with the main modulation optical path. The OAM orders of these channels range from −1 to −7 (1st row) and 1 to 7 (2nd row). The resulting patterns correctly reflect the topological charges and vortex handedness of each OAM beam. Figure 4c shows the intensity profiles of the experimentally generated multi-mode OAM beams at both the imaging plane and after 8 cm of transmission. The intensity patterns of channels 54, 56, 59, and 60 exhibit rotations, while the number of lobes in channels 57 and 58 doubles after propagation. The remaining simulated and experimental results are provided in Supplementary Figs. 16, 17 and Supplementary Movie 3.

The correlation coefficient (CC) matrix of the 51 simulated OAM beams is shown in Fig. 4d. The diagonal elements of this matrix represent the correlation between the output and target beams, with values close to 1, indicating the high purity of each OAM beam. The other elements, with values near 0, indicate that the generated OAM beams are uncorrelated, highlighting strong channel orthogonality and negligible crosstalk. Figure 4d also illustrates the histogram of the 60-channel transmission efficiency, where most channel efficiencies are concentrated around 2.9%. Figure 4e displays the simulated OAM spectra of the selected 4-channel multi-mode OAM beams. The definition formula of the spectral coefficients is detailed in the Methods. Their OAM spectra indicate that each order component has a highly uniform intensity distribution, with coefficients ranging from 0.95 to 1. Furthermore, the order of the generated OAM beams can be enhanced. Two examples of high-order OAM beam generations are provided in Supplementary Figs. 31, 32.

The model scalability of DMCN
To analyze the model scalability of DMCN, we propose an equivalent connection law under the condition of large modulation pixel size (side length ≥ 1.22λ). This law is detailed demonstrated in the Methods part and derived in the Supplementary Note 1. It assesses the performance similarity among different DMCN models by analyzing the connectivity between adjacent modulation layers. DMCN models with the same inter-layer connectivity α are defined as equivalent-connection models, which can be further classified into identical-connection models (with same N) and similar-connection models (with different N). The identical-connection models exhibit exactly the same functionality when loaded with the same set of phase modulation coefficients. Figure 5a present the output optical fields of identical connection models corresponding to the 144-channel holography model and the 60-channel OAM model. These models are loaded with the phase modulation coefficients derived from the aforementioned holography and OAM models. The equivalent models, with the pixel size p scaled by a factor of √2 and the layer spacing d scaled by a factor of 2, yield output optical fields with quality comparable to that of the original models. However, when p is reduced by a factor of 10 and d by a factor of 100, the output field quality drops significantly. This is because the β values for both models fall below the valid approximation range. When the wavelength of a DMCN model is doubled or halved, same performance can still be achieved by proportionally reducing or increasing the layer spacing. Additionally, Supplementary Fig. 24 demonstrates the bandwidth of DMCN models implemented with DOE based on the identical connection principle (i.e., in addition to scaling wavelength and layer spacing, the changes in phase profiles of DOEs caused by wavelength variation were also taken into account). After compensating for wavelength variation by adjusting layer spacing, the models are capable of producing satisfactory output fields across a wide wavelength range of 450~600 nm. For one thing, the identical connection principle decouples the DMCN model weights from hardware platforms, allowing seamless migration across devices with different parameters. For another, it expands the bandwidth of the model optimized at a single wavelength. Furthermore, since the inter-layer connectivity of a DMCN model determines its performance, similar connection models tend to exhibit comparable performance on the same task. This means that optimal hyperparameter settings for a small-scale model (with small N) can be transferred to a large-scale model to accelerate the training process. Given that our DMCN model is described and optimized based on the D2NN framework, these properties are also applicable to D2NN models in other application scenarios.

We selected 576 channels as shown in Supplementary Data 1 and used reconfigurable holography as an example to discuss the relationship between layer width, FOV width, channel number, and PSNR. The average system efficiencies of all simulated models in this section are maintained around 4.5%. To keep the connectivity between adjacent layers, the unit distance interval scales proportionally as the layer width changes. The relationship between the channel count and PSNR is shown in the Fig. 5b. The layer width and FOV width were fixed at 400 pixels and 200 pixels. The image PSNR decreases as the number of optimized channels increases. At 576 channels, the average PSNR and PCC are respectively 16.5dB and 0.892. Despite the significant increase in background noise, the letters remain distinguishable. Using a PCC threshold of 0.9, our DMCN model can generate up to 576-channel letter holography. Figure 5c shows an approximately linear relationship with a slope of about 0.58 between layer width and FOV width, when the number of channels and PSNR are fixed. This indicates that increasing the layer width allows for an enlargement of the output FOV without compromising the model capacity and imaging quality. In the Fig. 5d and Fig. 5e, the FOV width is set as 200 pixels. We only adjusted the layer width to alter the ratio of layer width to FOV width and analyzed its impact on channel capacity and quality. Enlarging the layer width leads to the improvement in image PSNR, with the number of channels kept constant. If the layer width is below 300 pixels, the improvement in image quality is pronounced. However, once it exceeds 300 pixels, the rate of improvement slows as the image quality has already reached a high level. An expansion in layer width also leads to nearly linear growth in the number of channels while preserving a mean PSNR of 23dB. Each 100-pixel increase of layer width yields approximately 44 additional channels. Therefore, the information capacity and channel quality of DMCN can be effectively improved by increasing the ratio of layer width to FOV width.

Methods
Forward propagation model of DMCN
The DMCN comprises three phase modulation layers and an output layer. The modulation layers transform the incident wavefield according to the following formula:
utl(x,y) = uil(x,y)tl(x,y)
tl(x,y) = exp(j2πSigmoid(ϕl(x,y)))
where uil(x,y) and utl(x,y) respectively represent incident and transmitted wave of the l-th layer (1≤l<3). tl(x,y) represents the transmission coefficient of l-th layer and serves as learnable parameters.

Propagation procedure between two adjacent layers can be expressed using the Rayleigh Sommerfeld convolution (RSC) formula as follows:
uil+1(x,y) = utl(x,y)*w(x,y,dl)
w(x,y,dl) = (1/jλ) * (dl/r^2) * exp(j2π/λ * r)
r = sqrt(x^2 + y^2 + dl^2)
Here, dl (1≤l<3) represent the distance between two layers, and w(x,y,dl) is the convolution operator that captures the diffraction connections.

Although the RSC method can accurately depict the light diffraction process in DMCN, the computational overhead caused by the convolution makes it impractical for numerical training. Instead, a lower-computing and faster algorithm known as angular spectrum method (ASM) was employed for model training and inference, which can be expressed as follows:
utl+1(fx,fy) = IFFT(FFT(utl(x,y)) * H(fx,fy,dl))
H(fx,fy,dl) = exp(j2π/λ * dl * sqrt(1 - (λfx)^2 - (λfy)^2))
where H(fx,fy,dl) is the spectrum transfer function, fx and fy are spatial frequencies along x and y axis, respectively.

The mechanically reconfigurable non-orthogonal channels of DMCN
The multiplexing channels of DMCN are realized through the combination of three types of mechanical operations: rotation, permutation, and translation. To theoretically demonstrate the reconfigurable principle, we derived the output wavefield of DMCN in compact form under the plane wave illumination by discretizing Eqs. (1) and (2).
Vec(Oc) = W(d3) * Diag(Rot(T3,Ω2)) * W(d2) * Diag(Rot(T2,Ω1)) * W(d1) * Diag(T1) * Vec(J)
Here, J is the input plane wave, T1, T2, T3 are the transmission matrices composed of convolutional kernels. Vec() operator flattens the matrix into column vector. Diag() operator transforms all elements of the matrix into a diagonal vector, thereby forming a diagonal matrix. Rot(,) operator rotates the matrix counterclockwise by a certain angle. From Eq. (4), the transfer matrix of DMCN can be further derived as follows:
Ac = W(d3) * Diag(Rot(T3,Ω2)) * W(d2) * Diag(Rot(T2,Ω1)) * W(d1) * Diag(T1)
This transfer matrix is solely determined by the system parameters and is independent of the input. The parameters Ω1 and Ω2 are adjusted through rotation, while d1, d2 and d3 are controlled by translation. The permutation operation alters the order of the three transmission layers, thereby affecting the values of T1, T2 and T3. Each operation can modify the transfer matrix, generating a new non-orthogonal channel. These channels are capable of performing different tasks with the same input.

Loss function and evaluation criteria
We employed the following loss function to train the DMCN.
LDMCN = LMSE + γEff * LEff
Here, LMSE quantifies the error between the output and target wavefields and is defined as follows:
LMSE = 1/N * Σ(E[|σ1 * Gc(x,y) - σ2 * Kc(x,y)|^2])
σc = Σ(Gc(x,y) * Kc(x,y)*) / Σ(|Kc(x,y)|^2)
In these equations, E[] is the average operator, while Gc(x,y) and Kc(x,y) stand the training target and the model output of the c-th channel, respectively. N is the number of channels. σ1 and σ2 are normalization factors. For hologram and focus applications, Kc(x,y) is defined as the intensity output |Oc(x,y)|^2. For OAM application, Kc(x,y) is defined as the complex output wavefield Oc(x,y).

The term LEff is a regularization factor designed to ensures system efficiency, defined as:
LEff = 1/N * Σ(LsubEff)
LsubEff = -ln(ηc/ηTh), ηc < ηTh; 0, ηc ≥ ηTh
ηc = Σ(|Oc(x,y)|^2) / Σ(|J(x,y)|^2)
where ηc represents the efficiency of the c-th channel, ηTh is a hyperparameter that specifies the target efficiency, and J(x,y) denotes the input plane wave. The region of interest (ROI) corresponds to FOVO for hologram and OAM applications, and to the target focus region for focus applications. γEff is the weight coefficient for the efficiency regulation term, which was set as 0.01 for all the models.

For hologram and focus evaluation, we further took the PCC and PSNR as metrics, which are defined as follows:
PCC(G(x,y),O(x,y)) = Σ((G(x,y)-E[G(x,y)]) * (O(x,y)-E[O(x,y)])) / sqrt(Σ(G(x,y)-E[G(x,y)])^2 * Σ(O(x,y)-E[O(x,y)])^2)
PSNR(G(x,y),O(x,y)) = 10 * log10(1 / E[|Ge(x,y) - Oe(x,y)|^2])
where e is the max-normalization operator.

For OAM evaluation, CC was determined as follows to assess the model performance:
CC(G(x,y),O(x,y)) = Σ(|G(x,y) * O(x,y)*|) / sqrt(Σ|G(x,y)|^2 * Σ|O(x,y)|^2)
Lastly, the normalized OAM coefficients defined below were employed to analyze the OAM components contained in generated combs:
Cl = 1/2π * ∫(∫(O(r,φ) * exp(-ilφ) dφ)^2 * r dr)
Cl = Cl / Σ(|Cl|^2)
where O(r,φ) is the output field in spherical coordinate.

The equivalent connection law of DMCN
Figure 5a shows a side-view schematic of two adjacent square modulation layers. We define the connectivity α as the ratio of the side length in the next layer covered by the maximum diffraction angle of the edge modulation unit in the preceding layer to the total side length.
α ≈ λd / (Np^2), β ≥ 1.12
Here, p denotes the side length of each modulation pixel, and the ratio of p to the operating wavelength λ is defined as β, which is typically greater than 10 for DOE in the visible spectrum. d represents the spacing between adjacent layers, and N is the number of modulation units along one side of the square. α<1 corresponds to under-connection, α=1 to critical connection, and α>1 to over-connection.

Specifically, when the parameter N is fixed and β further increases, the discretized angular spectrum diffraction transfer kernel H(Δfx, Δfy, d) can be uniquely determined by the connectivity α. This one-to-one mapping f can be written as follows:
f : α / (λd/p^2) ! H(Δfx, Δfy, d), β ≥ 2.24
Where δ denotes the upsampling factor applied to each modulation pixel. This indicates that, under the above conditions, two sets of adjacent modulation layers with identical connectivity exhibit identical diffraction transfer behavior. Two DMCN models with different parameters are defined as equivalent connection models if, in any mechanical configuration, each pair of adjacent modulation layers has the same connectivity (the output layer is viewed as a special layer characterized by a unit modulation coefficient). Specifically, if two equivalent connection DMCN models share the same N, they are referred to as identical connection DMCN models. Otherwise, if N differs, they are called similar connection DMCN models.

Numerical and experimental implementations
Our numerical DMCN models were implemented using Python and PyTorch on a workstation equipped with a Xeon® Gold 6430 CPU and a GeForce RTX 4090 GPU. To reduce numerical computation errors in the holography model, we increased the spectral sampling rate of the FFT by zero-padding to four times the original signal length (M=4N, δ=1). Building upon this, we further minimized errors in the focus and OAM models by enhancing the spatial sampling rate through two-fold pixel-wise upsampling (M=4N, δ=2). During each training iteration, the full batch containing all channel data pairs was fed into the model. And the Adam optimizer with a learning rate of 0.1 was used for backpropagation (BP) to update the transmission coefficients of the DMCN. The training procedure last around 10~15 min, involving 1500 epochs to ensure sufficient optimization.

For the experimental setup, A diode-pumped solid-state laser (LDM56, λ=532nm) was employed as the light source. The incident beam was expanded and collimated, then modulated by the three DOE layers. The output field was recorded by a CMOS camera (MUS500C.G) with a resolution of 2464×2056 pixels and a pixel size of 3.45μm. The fabrication process for the DOE started with ultrasonic cleaning of a fused silica substrate sequentially in acetone, isopropyl alcohol (IPA), and deionized water (DIW). The substrate was then pre-baked on a hot plate at 120°C for 5 min. A positive photoresist (AZ 1500) was spin-coated onto the substrate to a thickness of 1.68 μm. The DOE structures were defined using grayscale UV lithography (TTT-07-UVLitho-ACA), followed by development in AZ MIF 300 for 30s and rinsing in DIW for 30s. Each DOE was designed with 16-level phase quantization, and the quantization error analysis is provided in Supplementary Fig. 22a.

During the experiments, the DOE components were mounted in CNC-machined slot structures, each slot containing three grooves to enable mechanical switching of DOE layers. The slots were integrated with five-axis stages, combining two-axis rotation/pitch control with a three-axis differential micrometer translation stage (resolution 1μm). This configuration allowed precise alignment of the second and third DOE layers and rapid replacement of components once interlayer distances were set. The actual implementations of the optical path and the slot structure are shown in Supplementary Fig. 26. To minimize alignment errors, double-nested lens phase patterns were employed for calibration, enabling far-field diffraction–based alignment. The alignment tolerance for holographic functions was the strictest, with lateral tolerance of ±4.5μm and longitudinal tolerance of ±0.5mm (see Supplementary Note 3 for details).

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_1": "In the manuscript entitled “Diffractive Magic Cube Network with Super-high Capacity Enabled by Mechanical Reconfiguration”, the authors proposed a diffractive magic cube network (DMCN). The DMCN is composed of three cascaded layers and generates thousands of potential channels through permutation, translation, and rotation. Leveraging the D2NN model, the authors have numerically and experimentally achieved 144-channel holograms, 108-channel single-focus/multi-focus, and 60-channel OAM beam/comb generation.\nGiven the burgeoning demand for optical information processing, the research topic is of importance to boosting the capacity of optical systems. The proposed DMCN presents an effective paradigm for mechanically reconfigurable metasurfaces, exhibiting its potential in the fields of optical storage, computing, and communication. The topic is in congruence with contemporary research trends and is expected to draw the attention of researchers in relevant fields. Overall, this manuscript can be considered for publication in Nature Communications after a comprehensive major revision to address the noted issues that require attention.\n1. While the abstract and introduction of this manuscript provide in-depth descriptions of reconfigurable metasurfaces, the analysis and experimental sections appear to lack the incorporation of any metasurface components. Considering that the DMCN is put forward as an approach to improve the multiplexing capacity of mechanically reconfigurable metasurfaces, it is essential to showcase the experimental results applied in metasurfaces for validation. Therefore, I think it is recommended to supplement the metasurface-based experimental data to render the study more reasonable.\n2. In the experimental results of multi-channel holographic images (Fig. 5b and Supplementary Movies), the quality of the holographic images is not quite satisfactory to me, with many channels barely distinguishable. I suggest that the authors could conduct a thorough and systematic analysis of the factors contributing to the degradation of image quality and explore effective strategies for its improvement.\n3. The manuscript states that “the three-layer DMCN has 4179 potential channels, and a five-layer expansion could yield around 36 million potential channels”. However, in practical scenarios where a satisfactory SNR is guaranteed, the quantity of multiplexed channels is considerably lower than these theoretical values. A discussion regarding the maximum quantity of multiplexed channels with a satisfactory SNR employing the proposed approach would be necessary. This would help readers better understand the trade-offs between channel capacity and SNR, which is crucial for evaluating the feasibility and efficacy of the DMCN in practical applications.\n4. The schematic of the DMCN system is of a transmissive type (Figure 1), while the experimental implementation utilizes a reflective system (Figure 5). It would be beneficial to discuss whether the reflective system presents greater advantages over the transmissive system.\n5. The manuscript states that the achieved system features a lateral alignment error within ± 1.25 μm and a longitudinal alignment error within ± 0.1 mm. I think it is necessary to elucidate whether this degree of alignment accuracy is sufficient to apply the proposed DMCN method to reconfigurable metasurfaces. Should this not be the case, the authors are advised to provide an in-depth discussion of potential strategies for improving the alignment precision.\n6. In the study, the optimization of DMCNs exhibiting diverse functions predominantly relies on the design of loss functions, which necessitates extensive parameter adjustment. It would be beneficial to discuss the design of more universal or self-adaptive loss functions, with the aim of reducing the burden of parameter tuning and enhancing the efficiency of the optimization procedure.\n7. It would be insightful to discuss whether the proposed DMCN method possesses the latent potential to be implemented in the design framework of Fresnel holography to further augment the quantity of multiplexed channels.\n8. The research utilizes a deep diffractive neural network as the network model. I think it is necessary to clarify whether the deep diffractive neural network differs from the diffractive deep neural network (Ref. 20 and Ref. 22). If they are identical, it is recommended to employ the same terminology as that utilized in previous studies.\n9. It is noted that some figures (Fig. S1-S3 and Fig. S6-S17) in SI contain multiple sub-figures, yet the corresponding captions fail to provide individual concise introductions for the content of each respective sub-figure.\n10. It is suggested to explicitly indicate the specific combination cases for each figure or video, thus making their conveyed information more clarified and readily understandable.", "reviewer_2": "In this paper the authors propose new techniques to increase the multiplexing capability of metaholograms, with the additional feature of reconfigurability by means of mechanical degrees of freedom (permutations, rotations, translations). To reduce the cross-talk between the channels they perform a diffractive neural network optimization where three layers are considered. They provide both numerical experimental validation of their proposal, and they consider different kinds of multiplexed information: information storage (letter images), focusing manipulation, and OAM multiplexing. The first two situations deal with the intensity degree of freedom, whereas the third deals with complex amplitude, thus twice the number of degrees of freedom, which as a result reduces the number of multiplexed channels.\nThe paper is interesting and there is a very large amount of work and results. Partly this very large amount of data makes the paper hard to follow, and it is necessary to re-read it a few times to finally set each step and each kind of simulation in the broader context. My main criticism though is that, on my opinion, since the experiments have not been done with metasurfaces, the paper lacks the necessary impact for the journal. I also think that the increase in the number of actually realizable channels is not that large when compared with references given by the authors. Therefore, my recommendation is reject. Then, there are other remarks I want to address:\n- to avoid confusion the context of the three kind of simulated results should be better introduced from the beginning: what justifies enlarge the paper with three different kind of test objects (letters, focusing, OAM)? I can partly imagine, but it is not that clear when reading the paper.\n- about the mechanical degrees of freedom, it is not clear to me how you will achieve permutations reconfigurability with metasurfaces. Please, clarify this.\n- on my opinion, ‘super’ (in super-high) or ‘magic’ (in diffractive magic cube network) are not scientific descriptions. Probably it sells more when reading the title, but I am not sure that this is the way to go with scientific publications. This is more on the side of the editor to decide.\n- I find it misleading talking about thousands (or millions at the end of the paper) of potential multiplexing channels, when to avoid cross-talk and have reasonable SNR, in the end about 100 are actually achievable.\n- When talking about the width of the model layer and output FOV, can you indicate the units? I imagine that they are pixel number.\n- when you are talking about OAM combs, you mean linear combinations of 9 OAM modes equally weighted, is that correct?\n- the number of trainable parameters is the side length of the hologram multiplied by the number of layers? (i.e. 300x300x3)\n- in methods, after Eq.(1) and also before Eq. (3), the reference is [44] instead of [45]?\n- Fig. 3(d): letter to small to read", "reviewer_3": "I co-reviewed this manuscript with one of the reviewers who provided the listed reports. This is part of the Nature Communications initiative to facilitate training in peer review and to provide appropriate recognition for Early Career Researchers who co-review manuscripts.", "reviewer_4": "Authors introduce a diffractive magic cube network to advance the multiplexing capacity of mechanically reconfigurable metasurface. The 144-channel holograms, 108-channel single-focus/multi-focus, and 60-channel orbital angular momentum (OAM) beam/comb generation were numerically achieved and experimentally validated using a spatial light modulator and a reflective mirror. This work achieved a super-high level information throughput. However, it needs to further highlight its innovation and practical value, and provide more technical discussion.\n1.The authors present a multilayer modulation mechanism that achieves high-throughput optical control. However, the transmissive mode illustrated in Figure 1 appears inconsistent with the reflective configuration of the experimental setup depicted in Figure 5, requiring clearer elucidation to remove the confusion.\n2.The authors state in the abstract: “However, the channel numbers achieved in current studies are insufficient for practical applications because of inadequate mechanical transformations and suboptimal optimization methods.” Please clearly analyze the limitations of “suboptimal optimization methods” and highlight the advantages of the algorithm proposed in the paper.\n3.The authors state: “To keep high image quality, the value of η_Th was further reduced to 4.5%...Their PCCs show a mean of 0.98, ranging from 0.972 to 0.986, and their PSNRs have a mean of 22.8 dB, spanning from 20.2 dB to 26.4 dB, reflecting the high imaging quality of system.” However, the combination of low efficiency (4.5%) and “high imaging quality” appears counterintuitive. A physical explanation for this phenomenon is necessary.\n4.The authors present a schematic of the experimental setup in Figure 5a. However, variations in distances d1 and d2 during mechanical adjustments may disrupt optical alignment. How is the rapid alignment issue resolved during mechanical displacement, and can the actual experimental setup be illustrated in the appendix to demonstrate the device’ s practical value?\n5.This work achieves a high number of channels. However, the authors do not provide the corresponding system states (e.g., parameter configurations or physical conditions) during channel generation in the main text or appendix. While such states might be deemed physically irrelevant by the authors, their omission undermines the scientific rigor of the study.", "reviewer_5": "The authors propose a diffractive 'magic cube' network to obtained larger multiplexing capacity in mechanically reconfigurable metasurfaces.\nThe authors claim to obtain an increase in the channel numbers achieved with a low crosstalk.\nThe concept seems novel. Possible future applications of this concept include optical storage, computing, communication, and photolithography.\nA deep diffractive neural network model is used for optimization of the channel types generated by mechanical operations, rotations, permutations, and translations.\nThey achieved a 144-channel hologram, 108-channel single-focus/multi-focus, and 60-channel orbital angular momentum beam/comb generation.\nI do have several remarks before re-reviewing your paper:\n- The multiplexed images are very simple. Will your method work with more complex images? What is the limit of grayscales? Can you demonstrate it, at least by simulations?\n- Some figures need improvements due to very small and unclear details. Otherwise, it is not possible to judge these results. For example, Figs. 3a and 5d. I also would recommend splitting the figures, and not using any text smaller than 8 pt after printing the paper."}, "author_response": "We are grateful for the constructive comments on this manuscript (NCOMMS-25-13535) from all the referees. In the text below, each comment is quoted in italics and followed by the corresponding response. We have also revised the manuscript and supporting information accordingly. The revision parts in supporting information are highlighted in red The updates are listed here and highlighted in blue.\n----------------------------------------------------------------------------------------------------------------------\nGeneral comments from Referee #1: ... [Author response text omitted for brevity as per instructions to parse structure] ... \n----------------------------------------------------------------------------------------------------------------------\nGeneral comments from Referee #2: ... [Author response text omitted for brevity as per instructions to parse structure] ... \n----------------------------------------------------------------------------------------------------------------------\nGeneral comments from Referee #3: ... [Author response text omitted for brevity as per instructions to parse structure] ... \n----------------------------------------------------------------------------------------------------------------------\nGeneral comments from Referee #4: ... [Author response text omitted for brevity as per instructions to parse structure] ... \n----------------------------------------------------------------------------------------------------------------------\nGeneral comments from Referee #5: ... [Author response text omitted for brevity as per instructions to parse structure] ..."}, {"round": 2, "reviewer_comments": {"reviewer_1": "The revised version has mostly addressed the issues and improved the quality of the work. I recommend the publication of this manuscript based on the revision.", "reviewer_2": "Authors have responded to my remarks satisfactorily. The revised manuscript has greatly improved and now I consider that it can be accepted for publication.", "reviewer_3": "I co-reviewed this manuscript with one of the reviewers who provided the listed reports. This is part of the Nature Communications initiative to facilitate training in peer review and to provide appropriate recognition for Early Career Researchers who co-review manuscripts.", "reviewer_4": "This article presents a mechanically reconfigurable diffractive optical network. By combining various mechanical operations with deep learning-based joint optimization, it achieves an unprecedented optical channel capacity. Its performance is validated across multiple tasks, including holography, focusing, and OAM generation, offering a new approach for next-generation high-capacity optical information systems. However, after reading the article, the following questions need to be addressed:\n1. The article supplements experiments with transmissive DOE elements. However, since the unit structures are much larger than the wavelength, how is the zeroth-order spot handled, and does it affect image measurement?\n2. In the focusing experiment, the focal points are distributed at different positions. So, in the holography and vortex experiments, are the images formed at the same position? Is there a fundamental crosstalk limit?\n3. The article mentions selecting 144 channels for holography, 108 for focusing, and 60 for OAM from 4179 potential channels. Why were these specific numbers of channels chosen? Is there a risk of overlooking potentially better channel combinations?\n4. The rotational operation is limited to four angles (0°, 90°, 180°, 270°). Were finer step angles (e.g., 45°) tested? Would this yield more channels or merely increase redundancy?\n5. The manuscript needs to more explicitly compare its approach to other recent works for high-capacity multiplexing. The authors should discuss how their method differs from existing approaches and demonstrate how it offers clear advantages in terms of quantitate performance, such as isolation, cross-talk, and correlation coefficient matrix. In metasurface design, the following articles may provide insights for this work: 10.1126/sciadv.abc0711, 10.1038/s41377-023-01140-3, 10.1038/s41467-024-50586-5, 10.1002/adma.202304161.", "reviewer_5": "My previous remarks were addressed."}, "author_response": "We are grateful for the constructive comments on this manuscript (NCOMMS-25-13535B) from reviewer 4. In the text below, each comment is quoted in italics and followed by the corresponding response. We have also revised the manuscript and supporting information accordingly. The revision parts in supporting information are highlighted in red. The updates are listed here and highlighted in blue. ... [Author response text omitted for brevity]"}, {"round": 3, "reviewer_comments": {"reviewer_4": "I have no further concerns. I suggest for publication."}, "author_response": ""}]

Decision letter