Topological protection of multiparticle dissipative transport

Topological protection allows robust transport of localized phenomena such as quantum information, solitons, and dislocations. The transport can be either dissipative or non-dissipative. Here, we experimentally demonstrate and theoretically explain the topologically protected dissipative motion of colloidal particles above a periodic hexagonal magnetic pattern. By driving the system with periodic modulation loops of an external and spatially homogeneous magnetic field, we achieve total control over the motion of diamagnetic and paramagnetic colloids. We can transport simultaneously and independently each type of colloid along any of the six crystallographic directions of the pattern via adiabatic or deterministic ratchet motion. Both types of motion are topologically protected. As an application, we implement an automatic topologically protected quality control of a chemical reaction between functionalized colloids. Our results are relevant to other systems with the same symmetry.

T opological invariants are global properties of a system that remain unchanged by local perturbations. A property that depends only on topological invariants is topologically protected and is very robust against local changes. Topological protection is a promising approach to stabilize quantum computing 1 and is used to, for example, maintain robust transport in Hamiltonian systems. Topologically required edge states 2 in a bulk system can support transport of quantum mechanical excitations 3 , classical mechanical solitons 4 , dislocations 5 and gyroscopic waves 6 . When the edge states are located in a gap of the bulk excitation spectrum, they are protected against scattering into bulk states. Conservation of the Chern number, which is a topological invariant, makes the edge states robust against perturbative interactions. Topological insulators 7 , which are based on this concept, conduct at the surface but insulate in bulk. In driven Hamiltonian systems, additional invariants, such as the winding number 8,9 around quasi energy bands, add to the topological variety of possible transport phenomena.
Transport of a collection of classical particles with different properties, such as size, mobility and so on, usually generates a diffuse broadening of the trajectories. Topological protection might be used to transport a broad distribution of particles without dispersion, despite their different properties. High precision multiparticle transport is an important ingredient in, for example, multifunctional lab-on-a-chip devices 10,11 . Topological protection is also possible in driven dissipative (non-Hamiltonian) systems. The interplay between dissipation and topology has been studied in open quantum systems, see for example refs 12,13 for details. In driven dissipative lattices [14][15][16][17][18] , transport typically involves the thermal ratchet effect [19][20][21][22] , that is, biased irreversible jumps between neighbouring potential wells. Complicated correlations between the noise 23 , disorder 24 and many particle interactions 25 cause a motion of astonishing complexity. The thermal ratchet mechanism is not robust when transporting simultaneously different types of particles. The complexity makes it hard to maintain control over the transport of one type of particles when adjusting the external drive to control the transport of another particle type.
Here, we show an example of topological protection in a driven dissipative colloidal system. We achieve predictable multiparticle transport of diamagnetic and paramagnetic colloids above a hexagonal magnetic lattice. Using periodic boundary conditions, we describe the unit cell of the lattice as a torus, which defines the action space in which the colloids move. We drive the colloids with periodic modulation loops of an external magnetic field. The direction of the external field defines our control parameter space. The topological correspondence between control and action space is nontrivial, and enables robust, topologically protected, colloidal transport along the lattice vectors. The topological invariant in action space is the set of the two winding numbers around the torus, in close analogy with driven quantum systems 8,9 . We demonstrate experimentally the robustness of the motion and implement a topologically protected quality control of a chemical reaction between functionalized colloids. We also develop a theoretical framework that fully describes the experimental findings. Our results apply to any hexagonal pattern.

Results
Colloidal model system. We use paramagnetic polystyrene core shell and solid polystyrene colloids of average diameters 2.8 and 3.1 mm, respectively, dispersed in a mixture of diluted water-based ferrofluid. The immersion of the colloids renormalizes their effective susceptibilities such that w p,eff 40 and w d,eff o0 for paramagnetic and diamagnetic colloids, respectively. The colloids immersed in the ferrofluid are placed on top of a magnetically patterned ferrite garnet film (FGF), see Fig. 1a. Spacer beads and a top glass plate create a ferrofluid film of thickness d ¼ 4.8 mm.
Magnetic boundary conditions at the garnet-ferrofluid and glass-ferrofluid interfaces distort the magnetic field lines (created by the magnetic moments of the colloids) to be parallel to both interfaces. Virtual image dipoles form in the garnet film and the top glass plate and generate a potential that levitates the colloids into the mid-film plane, far away from the FGF, see Fig. 1b. Without the ferrofluid the colloids sediment to the pattern 26 Figure 1 | Schematic of the system. (a) Hexagonal garnet film with lattice constant a ¼ 11.6 mm covered with ferrofluid of thickness d ¼ 4.8 mm. One Wigner-Seitz unit cell is marked with a dashed line. By adjusting a closed modulation loop of a spatially homogeneous magnetic field H ext (t), we have total control over the transport of paramagnetic (blue) and diamagnetic (green) colloids immersed into the ferrofluid. (b) Lateral view of the system showing the distortion of the dipolar magnetic field (the field of the garnet pattern is omitted here) of an individual particle immersed in ferrofluid. The field distortion pushes the colloidal particle into the midplane of the ferrofluid film. (c) The direction of H ext varies on the surface of a sphere, defining control space C. Control space can be divided into three regions: the north, the tropics and the south. The northern and southern borders separate the tropics from the north and the south, respectively. Each border consists of 12 segments that we number from 0 to 11. The segments join at special points, indicated by empty circles and squares. L C is an example of a closed modulation loop of H ext that induces transport of diamagnetic particles along the lattice. The loop crosses the northern border through segments 1 and 4. to drive the system. Hence, our control space C is the surface of a sphere. Each point on C corresponds to a direction of H ext . For reasons that will become clear later, we can divide C in three regions: the north, the tropics and the south, see Fig. 1c. We call the interface between the tropics and the north (south) as the northern (southern) border. Each border is made of 12 segments. We experimentally perform periodic closed modulation loops L C of the external magnetic field. The period of the modulation is irrelevant provided that it is large enough such that the particles can follow the changes of the potential generated by H ext . There exist loops that induce intercellular colloidal transport. That is, when L C returns to its initial point, the colloids are not in their initial positions but on a different unit cell.
Experimental phase diagram. Only loops that cross the northern (southern) border of C induce intercellular transport of the diamagnets (paramagnets). We discuss first the motion of the diamagnets. Let L C ¼ (i N , j N ) be a loop in C that crosses the ith segment of the northern border from the tropics to the north and returns to the tropics using the jth segment, see an example in Fig. 1c. The experimental phase diagram showing the motion of diamagnetic colloids for all possible modulation loops of type Fig. 2a. The precise shape of the loop is irrelevant, a clear sign of the robustness of the transport. Only the segments of the northern border crossed by L C and their order is important. We can transport the diamagnets along the six fundamental lattice translations plus intracellular transport. Each direction is represented by a different colour in the phase diagram. The clustering of identical colours indicates the topological protection of the transport direction. A rotation of L C by p/3 around the polar axis, that is, from , is equivalent to rotate the sample by À p/3, and hence changes the transport direction by p/3. Therefore, the sixfold symmetry of the pattern guarantees that if transport is possible along one direction then it must also be possible in the other five directions.
There are two types of motion, adiabatic and deterministic ratchet moves. The phase diagram is a checkerboard of alternating adiabatic-and ratchet-squares. In an adiabatic motion, the diamagnets always travel following the minimum generated by the magnetic potential. Hence, the speed of the modulation determines the speed of the colloids along the full trajectory. In contrast, the speed of the modulation loop does not fully determine the speed of the colloids in a ratchet. At some points during the modulation loop, the diamagnets hop between two minima of the magnetic potential at an intrinsic speed that is uncorrelated to the speed of the modulation.
The adiabatic motion is fully reversible. Reversing the modulation from L C ¼ (i N , j N ) to L C ¼ (j N , i N ) always reverts the direction of motion, and there is no hysteresis when comparing forward and backward trajectories of the colloids. For example, the loop L C ¼ (0 N , 4 N ) transports the diamagnets adiabatically to the left, and the reverse loop L C ¼ (4 N , 0 N ) to the right. In a deterministic ratchet motion, reversing the direction of the modulation loop does not usually revert the direction of the transported colloids. L C ¼ (0 N , 3 N ), for example, induces a ratchet transporting the diamagnets to the left, but the reverse loop L C ¼ (3 N , 0 N ) does not transport the particles to the right. Only some of the modulation loops induce a time reversal ratchet in which reversing the modulation also reverts the direction of motion. See for example, the loops (0 N , 6 N ) and (6 N , 0 N ) in Fig. 2a. There is always hysteresis in ratchet-like motion between forward and backward trajectories, even in the case of time reversal ratchets.
The dynamics we have discussed for the diamagnets on the northern border holds also for the paramagnets on the southern border of C. The phase diagram of the paramagnets is the same as the one of the diamagnets, cf Fig. 2a, if instead of modulation loops of type L C ¼ (i N , j N ) we perform modulation loops of type L C ¼ (i S , j S ). That is, loops that cross the southern border of C from the tropics to the south using segment i and back to the tropics through segment j. An implicit equation to compute the location of the borders is given in the Methods section, and the exact location of the borders is shown in Supplementary  Fig. 1.
The northern and southern borders of C are well separated. Hence, it is easy to transport the diamagnets and paramagnets The same diagram holds for the paramagnets if the modulation loops cross the southern border: L C ¼ (i S , j S ). Each colour corresponds to a direction of motion, as indicated. Non-textured squares indicate adiabatic motion, and striped textured squares indicate ratchet motion. Empty circles mark the time reversal ratchets. (b) Polarization microscopy images of the pattern and the diamagnetic and paramagnetic colloidal particles at the end of a transport process. Scale bar (yellow rectangle middle image), 10 mm. The path of one paramagnet (blue arrow) and one diamagnet (green arrow) in A is depicted in the figure. The pink (cyan) segments of each path indicate the loop in C is on the southern (northern) hemisphere. The outer images show the transport of diamagnets into the x direction and paramagnets into one of the six crystallographic directions, by using modulation loops of type L C ¼ (4 N , 0 N , i S , j S ). The middle image is a Franconian folk dance performed by a paramagnetic and diamagnetic couple circulating around a central bubble in opposite sense and with different radius of the hexagon. successively by using a loop L C ¼ (i N , j N , k S , l S ). The loop starts on the tropics and goes to the north of C crossing the segment i N , then returns to the tropics (j N ) and moves to the south (k S ). It finally returns to the starting point on the tropics of C crossing the segment l S . In Fig. 2b, we show polarization microscopy images of the combined transport of six representative modulation loops of the form L C ¼ (4 N , 0 N , i S , j S ). The loops induce adiabatic transport of diamagnets along the x-direction and adiabatic transport of paramagnets along the six possible lattice translations. The trajectories are coloured in pink (cyan) when L C travels on the northern (southern) hemisphere of C.
We have total control over the colloidal motion, including the ability to programme complex trajectories. An example is given in the centre of Fig. 2b where we use a complex modulation loop such that the paramagnets and diamagnets perform a traditional Franconian folk dance. Videos showing the colloidal motion are provided in Supplementary Movies 1-7.
We next develop the theoretical framework needed to explain the experimental observations we have discussed above. An experimental application will be shown at the end of the Results section.
Action space. We call the space accessible to the colloids the action space A. Action space is a two-dimensional periodic hexagonal lattice at a fixed elevation above the FGF. Topologically A is a torus if we use periodic boundary conditions at the edges of a unit cell of the lattice, see Fig. 3a. Intercellular transport from one unit cell to the next cell via one of the two lattice vectors in real space is the same as one of the two windings around the torus. Loops L A in A that correspond to intercellular transport of colloids have non-zero winding numbers, and cannot be continuously deformed into a point. That is, lattice translation action loops are non-zero-homotopic. This is not the case in control space. Any modulation loop L C & C can be continuously deformed into any other desired modulation loop. For instance, we can continuously deform L C into a point on C. Therefore, all loops in C are zero-homotopic.
Here, we have demonstrated that there exist modulation loops L C in control space that induce either adiabatic or deterministic ratchet intercellular transport of the colloids. That is, there are zero-homotopic loops in C that induce non-zero-homotopic action loops L A with non-vanishing winding number around the torus. To understand how this is possible, we study theoretically the motion of point dipoles in the magnetic potential generated by the garnet and the external field.
Stationary manifold. The full dynamics is described by a point (H ext , x A ) moving in the product phase space C A, where x A 2 A is the position in action space. The energy landscape is given by the magnetic potential V m ¼ À w eff m 0 H 2 , with H the total magnetic field and m 0 the vacuum permeability. H is the sum of the external field H ext AC and the internal field H g (x A ) from the garnet film. The effective susceptibility w eff is positive for the paramagnets and negative for the diamagnets. Therefore, the unique scaled-potential V ¼ H 2 is enough to qualitatively describe the motion of both types of colloids. The stable points for the diamagnetic (paramagnetic) colloids are the minima (maxima) of V. The colloids are far away from the garnet film. Hence, we can approximate the potential by its leading non-constant term at large elevations, which is given by: where the sum runs only over the six reciprocal lattice vectors of the second Brillouin zone, q 2 i , all of which have magnitude q 2 .
The full expression of V, at any elevation, is given in the Þ are the components of the external magnetic field in the ferrofluid parallel and normal to the garnet film, respectively. w is the magnetic susceptibility of the ferrofluid. V is independent of the details of the FGF, and hence the following theory can be transferred to other systems with the same symmetry. For each value of H ext , the stationary points (H ext , x A ) are those for which r A V¼0, where r A indicates the gradient in action space. The set of these points forms the stationary manifold M, which is a twodimensional manifold in C A. Only if M contains non-zerohomotopic loops, we can achieve intercellular transport. M can be viewed as the unification of three submanifolds:  Let P C be the projection that maps any poinst in C A into control space. A key point is that P C is multifold on M, that is, several points x M ¼ H ext ; x A ð Þ are mapped on the same point H ext AC. The north, the south and the tropics of C, cf. Fig. 1c, have different multiplicity of preimages on M. The multiplicity changes at the borders of C via generation or annihilation of pairs involving one saddle point and one minimum or one maximum. We can divide M 0; AE into a collection of bijective areas, {n þ 1 , n þ 2 , t þ , s þ } CM þ , {n 01 , n 02 , n 03 , t 01 , t 02 , s 01 , s 02 , s 03 } CM 0 and {n À , t À , s À 1 , s À 2 } CM À . Each area has exactly one preimage of either the north, the tropics or the south of C. The letter indicates if the area is projected onto the north (n), the tropics (t) or the south (s) of C. These areas are listed in Fig. 3c (with the colours corresponding to the colouring of M, Fig. 3b). The first subindex (0, þ , À ) indicates if the area lies on M 0 , M þ or on M À . The second subindex labels the areas in case more than one area share the same letter and first subindex.
Fences and bifurcation points. We call the boundary between M 0 and M þ (M À ) as the northern F 0 þ (southern F 0 À ) fence, see Fig. 3b. A segment of F 0 þ separates a northern area on M þ (n þ ,1 or n þ ,2 ) from a northern area on M 0 (n 0,1 , n 0,2 or n 0,3 ) and starts and ends at vertices that are bifurcation points. Four different bijective areas in M meet at a bifurcation point, see Fig. 3b. There are three types of bifurcation points: triple zero bifurcation points B 0 , where three out of the four areas meeting at the point are on M 0 , and triple plus B þ (minus B À ) bifurcation points, where three out of the four areas meeting at the point are on M þ (M À ). In total, each fence has 12 bifurcation points that alternate between B 0 and B þ or B À , depending on the fence. No further points where more than two areas meet on M exist. The vertices on the fence are the only bifurcation points on M.
The projection P C maps each of the 12 segments of F 0 þ (F 0 À ) onto one segment of the northern (southern) border of C, see Fig. 1c. P C also maps the bifurcation points on F 0 þ (F 0 À ) onto 12 points at the northern (southern) border of C where two segments join. As P C is multifold on M, the preimage of the borders of C are the fences and other lines that we call the pseudo fences. The preimage of the projection of the bifurcation points are the bifurcation points and other points that we call pseudo bifurcation points. The pseudo fences separate different bijective areas on M, and are also divided in 12 segments, which are separated by pseudo bifurcation points. We label the segments of the borders of C, and the segments of the fences and pseudo fences in M from 0 to 11. A segment i on M is projected onto the segment i on C. Therefore, if we cross the ith segment of the border in C, we cross several ith segments of fences and pseudo fences on M.
Adiabatic motion. We next explain the adiabatic transport of diamagnets, similar arguments apply for the paramagnets. To achieve adiabatic transport of diamagnets, we need a modulation loop L C with a preimage loop L M in M lying entirely in M þ , such that the diamagnets can adiabatically follow the minimum of the magnetic potential. In addition, L M has to be non-zerohomotopic, that is, it has to wind around at least one of the two holes in M þ . This non-zero-homotopic loop is then projected onto a loop in A that can be non-zero-homotopic, and induce intercellular transport. As we have already shown adiabatic motion along any lattice direction, a ¼ w 1 a 1 þ w 2 a 2 , with a i the basic lattice vectors in A, is possible. Each transport direction corresponds to a value of the set of the two winding numbers {w 1 , w 2 } around the hole in A. Hence, our topological invariant is the set of winding numbers in A. In M there are 7 holes, and hence 14 winding numbers. The sum of any winding number in M over all loops L M corresponding to a given loop in C is zero since all loops in C are zero-homotopic. We can only achieve a non-zerohomotopic loop in M by first joining two zero-homotopic loops in M, and next disjoining them into two loops with opposite winding numbers. The detailed explanation is shown next. Consider the preimage in M of the modulation loop L C ¼ (1 N , 1 N ). We show a schematic of L C and all its preimage loops in M in Fig. 4a. If L C is entirely in the tropics of C (black loop) there are four zero-homotopic preimage loops on M. One is in M À , two in M 0 and another one in M þ . When L C touches the northern border of C (red loop), a pair of a minimum and a saddle point is generated at the fence F 0 þ . As L C crosses the northern border of C (yellow loop), the minimum-saddle point pair deforms into a fifth (zero-homotopic) loop on M that crosses the fence F 0 þ . This new loop eventually disjoins into two new loops, one on M 0 and one on M þ , when L C fully enters the north of C (blue loop). At each stage in C, the other four loops on M smoothly pass through different pseudo fences on M. All loops on M produced with modulation loops L C ¼ (i N , i N ) are zero-homotopic and therefore do not produce transport in A. The specific bijective areas covered by the loops on M depend on the segment of the border that we cross in C. A figure showing the bijective areas that meet at each segment of fences and pseudo fences is given in Supplementary Fig. 3.
Let us now deform L C such that it finally encircles the projection of a triple plus bifurcation point, see Fig. 4b. The final loop is L C ¼ (1 N , 2 N ). When L C crosses the projection of B þ , the corresponding loop L M crossing the fence on M joins with the pseudo fence-crossing loop on M þ . The result is a new loop that crosses the fence and passes through four areas on M. This loop lies in both M 0 and M þ . As no other loop entirely lies on M þ , the diamagnets will follow a ratchet motion, leaving the stationary surface M when the loop crosses the fence towards M 0 . We will explain the ratchet motion later on. The winding number of the joint fence-crossing loop on M is the sum of the winding numbers of the loops before the joining. In this case, the joining loops are zero-homotopic and hence the joint loop is also zero-homotopic and induces no transport in A.
In Fig. 4c, we further expand the modulation loop such that it encircles the following projection of a bifurcation point, a B 0 . The final loop is L C ¼ (1 N , 3 N ). In M, we again join the fencecrossing loop with a pseudo fence-crossing loop that now lies in M 0 . The result is, as in the previous case, a zero-homotopic fence-crossing loop.
We continue expanding the modulation loop such that it finally encircles the projection of two B þ points with L C ¼ (1 N , 4 N ), see Fig. 4d. Now, all four areas that meet at the second B þ bifurcation point in M are already joined in the fence-crossing loop. Therefore, crossing this bifurcation point disjoins the fence-crossing loops in two loops. The disjoint loops are no longer zero-homotopic. They have winding numbers with equal magnitude but opposite sign such that the sum is zero. One of the disjoint loops lies entirely in M þ , crosses the segments 1 and 4 of the pseudo fence between n þ 2 and t þ and winds around the holes in M þ . This loop is projected into a non-zero-homotopic loop in A that induces adiabatic transport of the diamagnets along the À x direction.
Encircling the next projection of a B þ point, L C ¼ (1 N , 6 N ), joins again the loop in M þ with a fence-crossing loop and creates a ratchet motion. The adiabatic transport is recovered by encircling a further projection of a B þ with L C ¼ (1 N , 8 N ). This disjoins the fence-crossing loop and generates a new non-zero-homotopic loop in M þ . This new loop crosses segments and pseudo fences in M þ that are different than the previous non-zero-homotopic loop, and induces transport in a different lattice direction.
Deterministic ratchet motion. We next explain why the deterministic ratchet is topologically protected and its fundamental role in the phase diagram. A ratchet motion occurs if there is no loop that lies entirely on M þ . In this case, the minimum of the magnetic potential that transports the diamagnets disappears at the fence, and the particles leave the stationary manifold M jumping to another minimum.
Our modulation is adiabatic, that is, the relaxation time of the colloids in the cage around the minimum is orders of magnitude faster than the period of the modulation. Hence, if the diamagnets are on M þ , they follow the minimum of the potential with a dynamics given by the modulation. If, on the contrary, the diamagnets are not on M þ , they move along the path of steepest descend of an effectively frozen potential in C. This path brings the diamagnets back to M þ . Consider again the modulation loop L C ¼ (1 N , 2 N ) that encircles the projection of a B þ point and creates a ratchet. In Fig. 5a, we plot the loop in C and the corresponding fencecrossing loop in M. We start L C in the tropics of C. In M, the diamagnets follow the segment in t þ of the loop. Next, L C crosses the first segment of the northern border, and the diamagnets cross the first segment of the pseudo fence between t þ and n þ 2 in M. Finally, L C crosses the second segment of the border. At this point, the loop in M touches the fence. The minimum in n þ 2 that adiabatically transported the particles annihilates with a saddle point and disappears. The colloids leave the stationary surface M at the annihilation site. Diamagnets follow now the path of steepest descend and are brought back to M þ through the return site, see Fig. 5a. Hence, the fence-crossing loop in M can be divided into accessible and inaccessible parts. The particles can stay only in the accessible part. The path of steepest descend connecting the annihilation and the return sites is topologically trivial. It cannot change the homotopy class of the adiabatic loop that emerges by taking the accessible part of the loop and gluing both ends, annihilation and return sites, together, see Fig. 5a. The reason is that the path of steepest descend develops in a continuous manner from the bifurcation point B þ . To understand this, imagine we make L C smaller and smaller but always encircling the projection of B þ . Then, annihilation and return sites come closer and closer to each other, and eventually meet at the bifurcation point. This argument holds for any other ratchet motion in the system. A ratchet loop is always topologically protected by an adiabatic loop. Both loops have the same homotopy class, and therefore the same direction of motion.
Let us now revert the direction of L C , see Fig. 5b. The accessible part of the loop and the annihilation and return sites change. The forward and backward adiabatic loops that protect the ratchets are different, but induce transport in opposite directions. Therefore, the ratchet is time reversal. Reverting the modulation reverts the colloidal motion. There is, however, hysteresis since forward and backward loops differ in the path of steepest descend, and in the segments being crossed in M. Usually, forward and backward loops are protected by adiabatic loops that induce transport in different, non-opposite, directions, resulting in a non-time reversal ratchet.
Ratchets play a fundamental role in the system. The homotopy class of an adiabatic loop, which lies on M þ , cannot be changed by continuous deformations. Therefore, the direction of transport cannot change if the motion remains adiabatic (note that all neighbouring adiabatic loops in the phase diagram of Fig. 2a induce transport in the same direction). It is only via ratchets that we can change the homotopy class of a loop and hence the transport direction. See, for example, in Fig. 2a, the ratchet loop L C ¼ (1 N , 2 N ) (protected by the adiabatic loop (1 N , 1 N )) and the ratchet loop (1 N , 3 N ) (protected by (1 N , 4 N )). The topological transition that changes the transport direction occurs when L C encircles the projection of a B 0 point ( Supplementary Fig. 4).
Theory and experiments are in perfect agreement. The above theory predicts exactly the same phase diagram we have found experimentally, cf Fig. 2a. In addition, we have also performed Brownian dynamic simulations of paramagnetic and diamagnetic particles moving in the potential given by equation (1). The simulations are also in perfect agreement with the theory and the experiments. The simulation allows us to introduce thermal noise in the system. We have verified that the topological protection is very robust against thermal fluctuations. When the noise is very high, such that it erases the energy landscape, the topological protection is lost. The degradation of the topological protection starts at both interfaces between different types of motion in the phase diagram: adiabatic-ratchet interface and the interface between deterministic ratchets along different directions.
The transport direction is also robust against other perturbations, such as the precise shape and speed of the modulation loop, changes in size, mobility and magnetic susceptibility of the colloids, and changes in the pattern that do not affect its symmetry (for example, the shape of the bubbles). Most strikingly, the directions of the ratchets are protected, that is, the topology of the stationary surface determines not only the direction of the adiabatic motion but also of the non-equilibrium ratchet motion.
There are always operations that break the topological protection. In our system, we can break the protection by changing the topology of M as we describe next.
Elevation above the garnet. We return now to the experiments. We have discussed the transport of colloids at elevations z far away from the garnet film so that the potential is given by equation (1). At low elevations, the field created by the garnet is very strong compared with the external magnetic field and the potential is given by that of the pattern alone. In this situation, the different parts of M are disconnected manifolds and have a trivial topology (spheres) missing the requirements for topological transport.
Depending on the dilution of the ferrofluid, the image-dipole potential may or may not overcome the gravitational potential. Hence, controlling the ferrofluid susceptibility gives direct control over the colloidal elevation z above the garnet film. Consider a loop in C that induces lattice translations if the colloids are at high elevations. By performing the same loop for different ferrofluidwater compositions, and hence varying the susceptibility w, we can observe the transition from non-zero-homotopic loops in A to zero-homotopic loops. The results are shown in Fig. 5c. The topological transition takes place at wE0.1. For wt0.1, the particles descend below a critical elevation z c , and the transition to the non-transport phase occurs. Above z c the effects of the hexagonal pattern are the same for any z, and topologically protected modulation loops work for any hexagonal pattern, independently of the fine details. By decreasing the elevation below z c , we remove the holes of M inducing a topological transition. This plays the role of gap closure in the dispersion relation of wave-like systems 28 .
Application. We use the topological protection to implement an experimental internal quality control of a chemical reaction. We consider the hybridization reaction between two complementary single-stranded oligo nucleotides of DNA, which we attach to the paramagnetic and diamagnetic colloids. If the hybridization is successful, the paramagnet (p) and diamagnet (d) irreversibly bind to form a quadrupole (q) We want to emulate the conditional command: if the reaction is successful, then transport the product q along a given direction a q , otherwise transport the educts p and d along directions a p and a d , respectively.
We have already shown how to induce topologically protected transport of the educts (dipoles). The product of the reaction is a quadrupole that senses the quadrupolar potential V q ¼ À (r A V) 2 . The modulation loops T p & C and T d & C for the transport of the educts can be chosen such that they do not affect the motion of the quadrupoles. We also find an appropriate modulation loop T q & C that transports the quadrupoles in the required direction without affecting the dipoles.
The paramagnets and diamagnets reside on opposite parts (M À and M þ ) of the stationary surface and, in the presence of the pattern, do not approach each other in A to allow the hybridization. To bring the colloids together, we perform a nonadiabatic hybridization loop H & C around the equator of C with a very high angular frequency. Hence, the colloids cannot follow the instantaneous potential and feel an almost flat averaged potential. Effectively, we erase the potential of the pattern such that the weak dipolar attractive interaction is enough to bring paramagnets and diamagnets together. The colloids meet in a bubble and rotate around each other such that hybridization is possible. After hybridization, the bond is strong enough to resist the magnetic stress exerted by the potential of the next modulation loops such that the bond is irreversible. The particle pair remains inseparable and behaves like a stable quadrupole. The entire modulation is a loop of the type T p T d HT q , see Fig. 6a. We show the transport of the colloids after a successful and a non-successful hybridization in Fig. 6b,c, respectively. Videos are provided in Supplementary Movies 8-9. This quality control is internal as we do not change the modulation loop after we have measured externally whether the reaction was successful. The quality control works without active intervention.

Discussion
When the modulation loop is in the north of C, the magnetic potential presents two minima, one in n þ 1 and one in n þ 2 that are projected onto different points on A. No colloidal transport between the minima exists as the potential barrier is too high. Phase space is hence divided into different nonergodic regions, and thermal equilibration only occurs over the cage around each minimum. The cage can only be left in a ratchet-like motion when the modulation loop touches the fence. Hence, our ratchet is associated with an ergodic-nonergodic transition, and might serve as a model for the cage effect in supercooled liquids 29 and glasses 30 .
Dissipation has been used in open quantum systems 12 to isolate topologically protected edge modes from a bath. The final state of the edge modes is nevertheless dissipation free.
In contrast, our system must be driven to maintain the transport. Moreover, the ratchet effect (crucial to change the direction of motion) is intrinsically dissipative and cannot, in general, be described with an effective Hamiltonian.
In one-dimensional systems, one can prove that thermal ratchets 31 , in which the potential evolves in time adiabatically, are always time reversal ratchets. We have shown here an example in two dimensions of a non-time reversal ratchet in an adiabatically evolving potential.
The construction of the stationary surface M and the mappings to action and control space is completely general and can be used for any potential. Other potentials might or might not support topologically protected transport, depending on the topological properties of M. Our results are directly transferable to any system with hexagonal symmetry, and a potential proportional to the square of a field, which satisfies the Laplace equation.
High-quality magnetic bubbles lattices, like the one we have used here, have been studied extensively 32 and hence the technology for its fabrication is well known. In addition, we note that any patterned substrates, such as lithographic magnetic patterns 33 , will induce similar transport.

Methods
Experimental preparation and measurements. The FGF films were grown by Tom Johansen (Oslo) via liquid phase epitaxy. We use the water-based ferrofluid EMG 707 from FerroTec GmbH, Germany. We dilute the ferrofluid with water. The final magnetic susceptibility is wE0.6. The time-dependent magnetic field is generated by three coils, following the ideas presented in ref. 34. Each coil controls the magnetic field along one of the three Cartesian axis. The current through the coils is provided by three phase-locked channels of programmable waveform generators (TTi TG1244) via three bipolar (KEPCO 20-50GL) amplifiers. The system is monitored via polarization microscopy. The pattern is visualized via the polar Faraday effect, and the colloids via ordinary transmission microscopy. Modulation loops in control space are programmed on a computer and transferred to the waveform generators.
Topology of the stationary manifold. We first find the projection of the bifurcation points and the fences onto action space. Next, we map action space into control space, so that we obtain the projection of the fences and bifurcation points in C. With these projections we compute the vertices v ¼ 96, edges e ¼ 124 and areas a ¼ 16 of M. The Euler characteristic of M is w(M) ¼ v À e þ a ¼ À 12, and it has genus g(M) ¼ 1 À w(M)/2 ¼ 7. The mapping of A into C also allows the determination of how the bijective areas are glued in M. Further details are given below.
Projection of the fence. We use coordinates in action space A, where a 1 and a 2 are the basic lattice vectors of the hexagonal lattice. In control space, we use coordinates where the azimuthal angle f is measured with respect to the direction of a 1 and the polar angle y with respect to the z-direction. Consider the unit vectorŝ e i (x 1 , where H g is the magnetic field of the garnet film.
As we have seen, the leading term of the magnetic potential is VpH ext Á H g and the stationary points are those for which r A V¼0.
When crossing the fence on M from M 0 to M þ , a saddle point changes to a minimum. Hence, the determinant of the above Hessian matrix must vanish at the fence, r A r A V k k fence ¼0. In this way, we find an implicit equation for the projection of the fences in action space. Both fences, F 0 þ and F 0 À , are projected into the same region in A with coordinates (x 1,f , x 2,f ) given implicitly by: where The projection of the fence F 0 þ in control space, that is, the northern border on C is given by: where The coordinates of the southern border on C are then obtained via the transformation y-p À y and f-f À p. Supplementary Fig. 1 shows the projection of the fences in the f À y plane of control space.
Projection of bifurcation points. Four bijective areas meet at a bifurcation point in M. Four segments (two fence segments and two pseudo-fence segments) form the branches that bifurcate in a bifurcation point in M. If we follow the fence F 0 þ and cross a bifurcation point, then either the minimum or the saddle point that meet at the fence (depending on the type of bifurcation point) changes the bijective area to which it belongs. If we cross the projection of a triple plus bifurcation point in C from the tropics to the north, then in A a minimum undergoes a pitchfork bifurcation into two minima and one saddle point. An equivalent bifurcation happens if we cross the projection of a triple zero bifurcation point, in which case the roles of saddle points and minima are reversed. The mathematical condition for a bifurcation point is as follows. Let v 0 be the eigenvector of the Hessian matrix, cf. equation (5), at the fence with eigenvalue 0. Then, a bifurcation point is a fence point that satisfies Solving the above equation, we find the projection in C of a triple plus bifurcation point lying on the fence F 0 þ at (y, f) ¼ (p/3, p). The coordinates in C of the projection of a triple zero bifurcation point in F 0 þ are (y, f) ¼ (0.381p, 7p/6). The other projections of bifurcation points belonging to the fence F 0 þ are obtained, for symmetry reasons, via rotations around the z axis by multiples of p/3. Using the transformation y-p À y and f-f À p, one finds the projection of the bifurcation points in F 0 À .
Bijective areas and the genus of M. We can thus map each point in A onto two opposing points in C. The mapping of a point in A onto the two points in C will fall either in the north and the south (one point in each region), or both points fall into the tropics of C. This gives the projections P A of the bijective areas of M into action space. Hence, we can see how the bijective areas are glued together in A and M. A bijective area is a connected preimage of either the north, the south or the tropics of control space. That is, there is a one-to-one correspondence between the bijective area in M and its corresponding region in C. Any loop in M lying entirely in a bijective area is projected onto a zero homotopic loop in A. Hence, in order to achieve intercellular transport, a loop must cross different bijective areas. The neighbouring bijective areas in M are shown in Supplementary Fig. 3. We can use it to construct the sequence of bijective areas for a given L C . For example, consider the loop L C ¼ (1 N , 4 N ). We start in the tropics, where there is only one minimum which is located in t þ . Segment 1 N connects t þ to n þ 2 , and segment 4 N connects n þ 2 to t þ , which closes the loop.
To compute the Euler characteristic of M and hence its genus, we need to count the vertices, edges and bijective areas, as detailed next. Topologically, the north of C is a simply connected area (that is, all loops are zero homotopic) with 12 edges (segments of the borders) and 12 vertices (projection of bifurcation points). Each point in the north of C has 6 preimages on M. Hence, the north of C contributes with 6 bijective areas, 12 Â 6 ¼ 72 edges and 12 Â 6 ¼ 72 vertices to M. A similar contribution comes from the south of C. The tropics of C is a non-simply connected area, for example, the equator is zero homotopic in C but not in the tropics of C. To easily compute the Euler characteristic, we need simply connected areas. We make the tropics of C simply connected by cutting it along a longitude that connects the projection of two bifurcation points, one in each border of C. The total number of edges of the tropics is thus 12 þ 12 þ 2 ¼ 26 and the total number of vertices is 12 þ 12 þ 2 ¼ 26. There are 4 preimages of the tropics on M. Hence, the total contribution of the tropics of C to M is 4 bijective areas, 4 Â 26 ¼ 104 edges and 4 Â 26 ¼ 104 vertices.
Next, we glue the bijective areas to form M. Two unglued edges are glued to form a single edge such that the number of glued edges of M is (72 þ 72 þ 104)/ 2 ¼ 124. Regarding the vertices, we have 72 þ 72 þ 104 ¼ 248 before gluing them in M. We have to subtract 8 vertices that were artificially produced by cutting the tropics of C in order to have a simply connected area. We have then 248 À 8 ¼ 240 unglued vertices. There are two types of vertices on M: bifurcation points where 4 bijective areas meet, and pseudo-bifurcation points where 2 bijective areas meet. There are 24 bifurcation points on M. Hence, we need 4 Â 24 ¼ 96 unglued vertices to glue together the bijective areas at the bifurcation points. The remaining 240 À 96 ¼ 144 unglued vertices are glued in pairs to form 144/2 ¼ 72 pseudo bifurcation points. The total number of vertices on M is the sum of the number of bifurcation and pseudo bifurcation points: 24 þ 72 ¼ 96.
Finally, the Euler characteristic of M is w(M) ¼ 96 À 124 þ 16 ¼ À 12 and the genus of M is g(M) ¼ 1 À w(M)/2 ¼ 7. Similar arguments can be used to calculate the genus of the submanifolds that form M, that is, M þ , M 0 and M À . We show in Supplementary Fig. 2 a plaster model of M.
Computer simulations. We simulate the motion of point dipoles moving in the potential given by equation (1) using Brownian dynamic simulations. The equation of motion is where t is the time, x A is the position of the dipoles in A, x is the friction coefficient and Z is a Gaussian random force with a variance given by the fluctuation-dissipation theorem. The plus (minus) sign in front of the potential holds for the diamagnetic (paramagnetic) colloids. The equation of motion is integrated in time with a standard Euler algorithm. We use a time step T/dtE2 Á 10 5 with T the period of a modulation loop L C . Simulations fully reproduce the experimental phase diagram.
Data availability. The data that supports the findings of this study are available from the corresponding author upon request.