1 Introduction

The idea that formally ‘quantum’ structures may have interdisciplinary applications in population dynamics is not new, and can be traced back at least to the works of Jørgensen (Jørgensen 1990, 1995; Jørgensen et al. 2007), and (implicitly) Ulanowicz (Ulanowicz 1997, 1999, 2009) in ecological modeling. Jørgensen makes an explicit reference to uncertainty principles, whereas Ulanowicz stresses the role of propensity theory (Popper 1982). The fact that propensity is naturally related to quantum probability was intuitively felt by Popper himself, but a more recent analysis (Ballentine 2016) makes it very clear that quantum probabilities are in fact propensities. A theory that involves propensities and uncertainty relations cannot be formally very different from quantum mechanics, at least from a certain point of view.

That such a possibility exists is not so surprising if one takes into account that the so-called quantum structures occur in many areas of science, and are in fact ubiquitous (Aerts 1986; Khrennikov 2010). If one adds that ecological, chemical or biological models necessarily involve autocatalysis, one is almost inevitably led to the formalism of nonlinear density matrix equations (Aerts et al. 2013). The latter observation may be regarded as an outline of a whole research program for a generalized population dynamics. The present paper presents some results of this program, generalizing and extending the scope of (Aerts et al. 2013). The aim is to go beyond proof-of-principle and toy models, discussed in the literature so far, and develop a formalism that is flexible enough for real-life modeling.

Nonlinear density-matrix (von Neumann) equations discussed in (Aerts et al. 2013) belong to a broad class of soliton systems. The equations were originally discovered in the context of fundamental physics (Czachor 1993, 1997) as a candidate theory for a putative nonlinear generalization of quantum mechanics. It was only later understood (Leble and Czachor 1998) that the system of differential equations one arrives at is in fact a soliton one.

A practical definition of a soliton system is the one where soliton techniques apply. Since soliton systems are known to possess a kind of universality, it is quite typical that a soliton equation discovered in one domain of science finds applications in other, completely unrelated fields. The classic example is the so-called nonlinear Schroedinger equation whose applications range from waves on deep ocean (Zakharov 1968) to optical solitons (Kibler et al. 2010). It was not so surprising that the same happened with soliton von Neumann equations which turned out to be equivalent to systems of coupled ordinary differential equations similar to rate equations occurring in biological and chemical modeling (Aerts et al. 2006; Aerts and Czachor 2006), while with a slight change of interpretation their dynamics could be related to replicating two-strand quantum systems, formal analogues of DNA (Aerts and Czachor 2007), or to n-level atoms in quantum optics (Czachor et al. 2000). In yet another reformulation, von Neumann soliton equations were found to contain as particular cases various known or new lattice systems (Cieśliński et al. 2003).

The greatest advantage of soliton systems is the possibility of solving them exactly. The method, employed here and originally introduced for a simple quadratic nonlinearity in (Leble and Czachor 1998), belongs to the class of Darboux–Bäcklund dressing transformations (Doktorov and Leble 2007). The essence of the technique lies in finding a transformation which maps one solution \(\rho (t)\) of a given equation into another solution \(\rho [1](t)\) of the same equation. Not all systems of differential equations possess this property but those that do, belong to a soliton class. Once we have found the transformation it remains to find a ‘seed’ solution \(\rho =\rho [0]\) which will allow us to start the chain of transformations: \(\rho [0]\rightarrow \rho [1]\rightarrow \rho [2]\rightarrow \dots\). A difficulty is that this initial step may be highly nontrivial.

There are two problems. The first one is obvious: \(\rho\) has to be found by other means. Sometimes it is easy to find a seed solution. For example, the celebrated Korteweg–de Vries soliton equation has a trivial zero solution which is nevertheless nontrivial enough to start the chain of transformations, leading to a solitary wave already after a single step (Matveev and Salle 1991). In the von Neumann case \(\rho =0\) implies \(\rho [1]=0\), a fact illustrating the second difficulty. Namely, an appropriate theorem guarantees that a solution \(\rho\) will generate a solution \(\rho [1]\). However, the theorem does not guarantee that we will be happy with \(\rho [1]\). Examples are known where, after tedious calculations, one arrives at \(\rho [1](t)=\rho (t)\), or \(\rho [1](t)=\rho (t-t_0)\). The art of soliton modeling is to find appropriate seed solutions by means of non-soliton methods.

Let us illustrate the point on the simplest yet highly nontrivial example of a soliton von Neumann equation,

$$\begin{aligned} i{{\dot{\rho }}}=[H,\rho ^2] \end{aligned}$$
(1)

solved for the first time by soliton methods in (Leble and Czachor 1998). Here \({{\dot{\rho }}}=d\rho /dt\) and \([A,B]=AB-BA\) is the commutator. H is an operator which, from the point of view of rate equations, encodes the values of possible kinetic constants (Aerts et al. 2013). So, we have to begin with a solution \(\rho\) of (1) and then we know, by the theorem, that some \(\rho [1]\) will again satisfy

$$\begin{aligned} i{{\dot{\rho }}}[1]=[H,\rho [1]^2]. \end{aligned}$$
(2)

But how to find an initial \(\rho\) if we do not know how to solve (1)? A first try is a \(\rho\) which satisfies \(\rho ^2=\rho\), so that \(\rho (t)=e^{-iHt}\rho (0)e^{iHt}\) is a solution of (1) since

$$\begin{aligned} i{{\dot{\rho }}}=[H,\rho ^2]=[H,\rho ]. \end{aligned}$$
(3)

Equation (3) is mathematically identical to the linear von Neumann equation from quantum mechanics, so we know everything about it. However, it turns out that in such a case \(\rho [1]^2=\rho [1]\) as well, and the dynamics of the new solution is effectively as linear as the one of \(\rho\). One of the tricks that give the right seed solution, invented in (Leble and Czachor 1998), is to find a \(\rho\) satisfying \(\rho ^2=a\rho +\varDelta\), where a is a number and \(\varDelta\) is an operator commuting with H. Then

$$\begin{aligned} i{{\dot{\rho }}}=[H,\rho ^2]=a[H,\rho ]+[H,\varDelta ]=a[H,\rho ], \end{aligned}$$
(4)

is effectively linear and can be easily solved. Still, an appropriate choice of a and \(\varDelta\) guarantees that \(\rho [1]\) is qualitatively different from \(\rho\), and some new purely nonlinear effects occur. Note that \(\varDelta =F(H)\), for some function F, so possibilities of finding an appropriate \(\rho\) may crucially depend on properties of H.

The solutions \(\rho [1]\) found in (Leble and Czachor 1998) exhibited a new type of soliton phenomenon termed self-scattering. The theorem on dressing transformations was further generalized in (Ustinov et al. 2001) to the general equation

$$\begin{aligned} i{{\dot{\rho }}}=[H,f(\rho )] \end{aligned}$$
(5)

where f(x) was basically arbitrary, and explicit solutions were found. Subsequent works showed that self-scattering may look similar to opening of a double spiral (Aerts and Czachor 2006), replication (Aerts and Czachor 2007), or morphogenesis (Aerts et al. 2003). Self-scattering also leads to a specific form of pattern formation, as shown in Fig. 1. Nonlinearity is here quadratic, \(f(\rho )=\rho ^2\), and H is a quantum harmonic oscillator Hamiltonian. Formation of the pattern from Fig. 1 is described by

$$\begin{aligned} i{{\dot{\rho }}}(t,y,y') = \left( -\partial ^2_{y}+\partial ^2_{y'} +y^2-y'^2\right) \int dz\,\, \rho (t,y,z)\rho (t,z,y'). \end{aligned}$$
(6)

The pattern itself is obtained through a contour plot of \(A(t,y)=\rho (t,y,y)\). Such a two-dimensional solution is sometimes termed a Harzian (Syty et al. 2000). The example of (6) shows that soliton von Neumann equations, when written in space-time variables, are mathematically similar to infinitely-dimensional reaction-diffusion systems (Murray 1977; Fife 1979; Cross and Hohenberg 1993; Aerts et al. 2003), whose general form is

$$\begin{aligned} i\dot{X}={{\hat{\omega }}} X+{\hat{\omega }}_1 f(X) \end{aligned}$$
(7)

where \({{\hat{\omega }}}=A\nabla ^2\), and A and \({\hat{\omega }}_1\) are, in general complex, matrices and X, f(X) are vectors. Particular cases of (7) are the Swift–Hohenberg, \(\lambda -\omega\), and Ginzburg–Landau models (Ginzburg and Landau 1950; Howard and Kopell 1977; Swift and Hohenberg 1977; Stewartson and Stuart 1971).

A transition between the reaction-diffusion and rate-equation forms of the soliton system is obtained if one appropriately chooses the basis in the space of solutions. In the harmonic oscillator case the basis is given by Hermite polynomials times a Gaussian, which are eigenfunctions of H. The pattern from Fig. 1 is obtained if at \(t=0\) one starts with \(\rho\) written as a combination of such Hermite-polynomial eigenfunctions (in the variable y).

Fig. 1
figure 1

Change of pattern as a result of self-scattering

The choice of a harmonic-oscillator H is here not accidental, and is related to the structure of the spectrum of H. Namely, it is known that the harmonic oscillator is an example of a system whose energy levels are equally spaced: \(E_1=E_0+\varDelta E\), \(E_2=E_1+\varDelta E, \ldots \,E_{n+1}=E_n+\varDelta E,\ldots\) with \(\varDelta E\) being independent of n. Many different Hamiltonians share this property. However, when one translates the von Neumann equation into a set of coupled rate equations, one finds that the ‘energy levels’ play effectively the role of kinetic constants k, determining the dynamics of a kinetic (biological, chemical, ecological...) process.

Still, it is very unlikely that a real-life modeling will encounter a case where kinetic constants possess this type of regularity. On the contrary, it is typical that one will deal with basically arbitrary k values. Is it a problem? Yes, and a serious one: Practically all the explicit procedures of finding a seed \(\rho\) one can find in the literature are based on H whose spectrum is equally spaced, or at least contains an equally spaced subset of eigenvalues (my unpublished preprint (Kuna 2004) seems the only exception). So, the first goal of the present paper is to describe a method that works for allH whose spectrum is discrete, and thus with no restrictions whatsoever on the possible values of admissible kinetic constants (although still not for the most general form of nonlinearity, see the last section).

The second goal is to allow for arbitrary, explicitly time dependent functions

$$\begin{aligned} f\left( \rho (t)\right)= & {} \sum _{j=0}^\infty f_j(t)\rho (t)^j \end{aligned}$$
(8)

in (5). The formulas we will discuss will be valid for any choice of \(f_j(t)\). In practical examples, however, \(\rho (t)\) is an \(n\times n\) Hermitian matrix (corresponding to an ecosystem with up to \(n^2\) populations existing at time t). For a finite n the infinite sum in (8) can be replaced by a finite sum, no matter which f we select (see “Appendix”). So, practically, our formulas are valid for nonlinearities described by polynomials of any order, with arbitrary time-dependent coefficients. This is the second element extending our results beyond all that has been known on soliton von Neumann equations so far. The number of independent populations encoded in an \(n\times n\) matrix \(\rho\) can be reduced by imposing constraints such as \(\,{\text {Tr}}\,\rho =1\) or the like.

Now, before we describe all the necessary technicalities and examples, let us clarify one more point. It is known that ecosystems such as plankton may involve tens or hundreds of species (Hutchinson 1961; Huisman and Weissing 1999; Wilson and Abrams 2005; Allesina and Levine 2011). There is practically no non-soliton technique that would allow us to find an exact solution for a system consisting of, say, 100 species coupled by various catalytic and autocatalytic feedback loops. Here, we will give examples of explicit solutions \(\rho [1](t)\) corresponding to 30 or 42 populations, interacting via (auto)catalytic feedbacks, in environments that change in time. But in order to achieve it, we have start with a seed solution \(\rho (t)=\rho [0](t)\).

The way we proceed is the following. We first write the Hamiltonian H in a diagonal form (this is always possible since H is Hermitian),

$$\begin{aligned} H = \left( \begin{array}{cccc} H^{(1)} &{} 0 &{} 0 &{} \cdots \\ 0 &{} H^{(2)} &{} 0 &{} \cdots \\ 0 &{} 0 &{} H^{(3)} &{} \cdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots \\ \end{array}\right) , \end{aligned}$$

where \(H^{(j)}\) are blocks of dimension 2 or 3. We then choose the seed solution in a block-diagonal form,

$$\begin{aligned} \rho = \left( \begin{array}{cccc} \rho ^{(1)} &{} 0 &{} 0 &{} \cdots \\ 0 &{} \rho ^{(2)} &{} 0 &{} \cdots \\ 0 &{} 0 &{} \rho ^{(3)} &{} \cdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots \\ \end{array}\right) \end{aligned}$$

and solve the equation in question. The solution \(\rho (t)\) is typically not a very impressive one as involving an effectively linear coupling between pairs or triples of species. But recall that in the Korteweg–de Vries case the seed solution is just zero. What we are interested in is the solution \(\rho [1]\) it generates, and perhaps also \(\rho [2]\), \(\rho [3]\) etc., since the procedure, once successfully started, can be iterated an arbitrary number of times. In our case, the seed solution is chosen in such a way that

$$\begin{aligned} \rho [1] = \left( \begin{array}{cccc} \rho [1]^{(11)} &{} \rho [1]^{(12)} &{} \rho [1]^{(13)} &{} \cdots \\ \rho [1]^{(21)} &{} \rho [1]^{(22)} &{} \rho [1]^{(23)} &{} \cdots \\ \rho [1]^{(31)} &{}\rho [1]^{(32)} &{} \rho [1]^{(33)} &{} \cdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots \\ \end{array}\right) \end{aligned}$$

where any\(2\times 2\), \(3\times 3\), \(2\times 3\), or \(3\times 2\) block contains nonzero matrices. In standard terminology \(\rho [1]\) is a single-soliton solution (\(\rho [N]\) would be an N-soliton one). The interaction of all the species of a plankton-type community is described here through a soliton effect. We have to make sure that all \(\rho [1]^{(kl)}\ne 0\), which is a nontrivial task described in detail in the following sections.

2 The Formalism

2.1 States

A generic state of an ecosystem occurs only once in its history. This is basically why states represent propensities (tendencies) and not probabilities defined by the frequency approach. (As opposed to quantum mechanics, properties of an ecosystem cannot be tested on a great number of identically prepared ecosystems.) A state is described by an operator (or just a matrix) \(\rho\) satisfying: (a) Hermiticity \(\rho ^\dag =\rho\), (b) positivity \(\rho > 0\), and (c) normalization \(\,{\text {Tr}}\,\rho =1\). A Hermitian operator is positive if it does not have negative eigenvalues. Any set of Hermitian positive operators \(P_k\) (‘propositions’), satisfying the resolution of unity \(\sum _k P_k=I\) (I denotes the identity operator) defines a set of propensities by the formula \(p_k=\,{\text {Tr}}\,(P_k\rho )\) (Ballentine 2016). We say that two propensities \(p_k=\,{\text {Tr}}\,(P_k\rho )\) and \(\tilde{p}_l=\,{\text {Tr}}\,({\tilde{P}}_l\rho )\) are complementary if the commutator \([P_k,{\tilde{P}}_l]=P_k{\tilde{P}}_l-{\tilde{P}}_lP_k=Q_{kl}\) is nonzero. The propensities are complementary since their standard deviations \((\varDelta p)^2=\,{\text {Tr}}\,(P^2\rho )-(\,{\text {Tr}}\,(P\rho ))^2\) satisfy the uncertainty relation

$$\begin{aligned} \varDelta p_k \varDelta {\tilde{p}}_l\ge \frac{1}{2}|\,{\text {Tr}}\,(Q_{kl}\rho )|. \end{aligned}$$
(9)

The model is non-Kolmogorovian, i.e. does not satisfy all the axioms of probability formalized in (Kolmogorov 1956). One can say that complementary propensities are associated with different contexts. The set of propensities \(p_k\) is maximal if its corresponding set of propositions \(P_k\) sums to I. Complementary propensities belong to different maximal sets. Propensities belonging to different maximal sets do not have to sum to 1. It is sometimes useful to consider models where \(\,{\text {Tr}}\,\rho \ne 1\). The propensities are then replaced by more general kinetic variables, while Hermiticity and positivity of \(\rho\) guarantee that the associated variables are nonnegative at any moment of time.

A single density matrix nonlinear equation can be treated as a very compact form of a set of nonlinear rate equations involving variables belonging to several maximal sets (Aerts and Czachor 2006; Aerts et al. 2006). In order to construct the nonnegative variables occurring in the rate equations one selects an orthonormal basis \(\{ |n\rangle ; \langle n|m\rangle =\delta _{nm}\}\) in the linear space which forms the domain of \(\rho\). Then three families of propositions are constructed: the complete set of projectors on basis vectors, \(\{P_n=|n\rangle \langle n|\}\), supplemented by two sets of projectors, \(\{P_{jk}=|jk\rangle \langle jk|\}\) and \(\{P'_{jk}=|jk'\rangle \langle jk'|\}\), constructed from linear combinations of the basis vectors

$$\begin{aligned} |jk\rangle= & {} \frac{1}{\sqrt{2}}\left( |j\rangle +|k\rangle \right) , \end{aligned}$$
(10)
$$\begin{aligned} |jk'\rangle= & {} \frac{1}{\sqrt{2}}\left( |j\rangle -i|k\rangle \right) , \end{aligned}$$
(11)

for \(j\ne k\). Decomposing matrix elements of \(\rho\) into real and imaginary parts, \(\rho _{nm} = \langle n|\rho |m\rangle = x_{nm} +iy_{nm}\), we obtain three families of nonnegative variables,

$$\begin{aligned} p_n= & {} \, \mathrm{Tr} P_n \rho = x_{nn}\nonumber \\ p_{jk}= & {} \, \mathrm{Tr} P_{jk} \rho = x_{jk} + \frac{1}{2}(p_j + p_k )\nonumber \\ p'_{jk}= & {} \, \mathrm{Tr} P'_{jk} \rho = y_{jk} + \frac{1}{2}(p_j + p_k ) \end{aligned}$$
(12)

It is interesting that replicator equations, a typical tool in evolutionary game theory (Smith 1982; Hofbauer and Sigmund 1998; Friedman and Sinervo 2016), can be written in a density matrix nonlinear von Neumann form, but with probabilities interpretable as \(p_n\) (Gafiychuk and Prykarpatsky 2004) (\(p_{jk}\) and \(p'_{jk}\) have no clear interpretation: \(x_{jk}=\sqrt{p_jp_k}\), \(y_{jk}=0\)). If \(\rho\) is a positive but non-normalized solution (\(\rho >0\), \(\,{\text {Tr}}\,\rho \ne 1\)) then the variables are nonnegative, but cannot be treated as probabilities or propensities. Of particular interest is the case of a dynamics which does not preserve positivity of \(\rho (t)\) for all t. In such a case, starting with a positive initial condition \(\rho (0)>0\), we will find dynamic variables that are nonnegative only for certain finite amounts of time. This type of solution could be interpreted as a system where certain species disappear or appear after some time. Unfortunately, this very interesting possibility is beyond the scope of the present paper.

2.2 Hierarchic Organization of Environments

Environments are organized hierarchically (Allen and Starr 1982). Subsystems are coupled to environments non-symmetrically (Aerts et al. 2013). The mathematical model is built on the basis of a hierarchically coupled set of rate equations,

$$\begin{aligned} {{\dot{\rho }}}_1= & {} \, F_1(\rho _1), \end{aligned}$$
(13)
$$\begin{aligned} {{\dot{\rho }}}_2= & {} \, F_2(\rho _1,\rho _2), \end{aligned}$$
(14)
$$\begin{aligned} {{\dot{\rho }}}_3= & {} \, F_3(\rho _1,\rho _2,\rho _3), \end{aligned}$$
(15)
$$\begin{aligned}&\vdots&\end{aligned}$$
(16)

The system described by \(\rho _1\) plays a role of environment for the remaining subsystems. The one described by \(\rho _2\) is the environment for \(\rho _3\), \(\rho _4\), and so on. The collection of rate equations has to be solved in a hierarchical way. One begins with \(\rho _1\) since the associated differential equation is closed. Once one finds a given \(\rho _1(t)=r(t)\), one switches to

$$\begin{aligned} {{\dot{\rho }}}_2= & {} \, F_2(r,\rho _2). \end{aligned}$$
(17)

At each level of the hierarchy (perhaps with the exception of \(\rho _1\)), one has to solve a system of coupled nonlinear rate equations with time dependent coefficients. The formalism described in the present paper assumes that the time-dependent coefficients are arbitrary. All the examples discussed below can be understood as corresponding to an n-th level of the hierarchy.

2.3 Dressing Transformation from a Zakharov–Shabat Problem

We shall consider a pair of Zakharov–Shabat (ZS) problems (Matveev and Salle 1991),

$$\begin{aligned} z_{\mu } | \phi _{\mu }\rangle= & {} \, \left( \frac{1}{\mu }\rho -H\right) | \phi _{\mu }\rangle \end{aligned}$$
(18)
$$\begin{aligned} i| {{\dot{\phi }}}_{\mu }\rangle= & {} \, \frac{1}{\mu }A| \phi _{\mu }\rangle \end{aligned}$$
(19)

where \(z_\mu\) is a t-independent complex number. Differentiating (18) over t and multiplying (19) by \(-iz_\mu\) we obtain two equations with identical left-hand sides. Compatibility of the right-hand sides is equivalent to

$$\begin{aligned} i{{\dot{\rho }}}= & {} [H,A], \end{aligned}$$
(20)
$$\begin{aligned} \left[ \rho , A\right]= & {} 0. \end{aligned}$$
(21)

The second condition means that A is an arbitrary function of \(\rho\), i.e. \(A=f(\rho )\). Therefore the first condition is a nonlinear equation with respect to \(\rho\). This is our nonlinear von Neumann equation

$$\begin{aligned} i{{\dot{\rho }}}= & {} [H,f(\rho )]. \end{aligned}$$
(22)

We say that (18)–(19) is a Lax pair for (22), whereas (22) is a Lax representation of a system of rate equations. This Lax pair was found in (Ustinov et al. 2001) and later generalized to yet more complicated von Neumann type equations in (Ustinov and Czachor 2002; Cieśliński et al. 2003). All the examples discussed below are based on the following theorem, which is a particular case of the general result discussed, for example, in (Cieśliński et al. 2003).

Theorem 1

Assume\(| \phi _{\mu }\rangle\)is a solution of (18) and (19) and\(\langle \psi _{\nu }|\)is a solution of

$$\begin{aligned} z_{\nu } \langle \psi _{\nu }|= \,& {} \langle \psi _{\nu }|\left( \frac{1}{\nu }\rho -H\right) \end{aligned}$$
(23)
$$\begin{aligned} -i\langle {{\dot{\psi }}}_{\nu }|= \,& {} \langle \psi _{\nu }| \frac{1}{\nu }A. \end{aligned}$$
(24)

Let\(\rho [1] = T\rho T^{-1} = (1 + \frac{\mu - \nu }{\nu }P)\rho (1 + \frac{\nu -\mu }{\mu }P)\)and\(A[1]= TAT^{-1}\)with

$$\begin{aligned} P=\frac{| \phi _{\mu }\rangle \langle \psi _{\nu }|}{\langle \psi _{\nu }| \phi _{\mu }\rangle }. \end{aligned}$$
(25)

In this case if\(\rho\)andAfulfill (20) and (21),then\(\rho [1]\)andA[1] satisfy (20) and (21) as well.

The notion of compatibility used before (20) is rather misleading, because it means that (20)–(21) is a sufficient condition for the existence of solutions of ZS problems. It is a part of the language we encounter in this field. The relation between (20)–(21) and ZS problems is given by Theorem 1. A more precise explanation of this theorem, as well as of the dressing transformation, is given in the “Appendix”. Setting \(\nu = {\overline{\mu }}\) one obtains a unitary T, so that the dressing transformation preserves Hermiticity and positivity of \(\rho [1]\).

3 Constructing Seed Solutions

This is the core part of the work. We will show how to construct seed solutions for all H, any time-dependent f, and arbitrary numbers of interacting species. In order to eliminate typing errors, all the explicit examples discussed later on in the paper were cross-checked in Wolfram Mathematica.

3.1 Building Seed Solutions with \(2\times 2\) Blocks

Assume the Hamiltonian has discrete spectrum, \(H = \sum _nh_n Q_n\), where \(Q_n\) and \(h_n\) are spectral projectors and eigenvalues of H, respectively. We start from an even-dimensional case. Now group all spectral projectors in pairs related to different eigenvalues \(h_k\) and \(h_{k'}\), generating projectors \({\mathbf{R}}^{(k)} = Q_{k} + Q_{k'}\) on two-dimensional invariant subspaces \({{{\mathcal {H}}}}^{(k)}\). Because H is Hermitian we have \(\bigoplus _k {\mathcal{H}}^{(k)} = {\mathcal{H}}\) and \({\mathcal{H}}^{(k)}\) are mutually orthogonal. For simplicity of notation we put \(h_k = h_{1}^{(k)}\) and \(h_{k'} = h_{2}^{(k)}\). We are interested in solutions

$$\begin{aligned} i{{\dot{\rho }}}^{(k)} = [H^{(k)} , f(\rho ^{(k)} ) ] \end{aligned}$$

for \(\rho ^{(k)} = {\mathbf{R}}^{(k)} \rho {\mathbf{R}}^{(k)}\) and \(H^{(k)} = {\mathbf{R}}^{(k)} H {\mathbf{R}}^{(k)}\).

Here, a notational digression. Whenever we perform explicit matrix calculations, we implicitly identify

$$\begin{aligned} H^{(k)} = {\mathbf{R}}^{(k)} H {\mathbf{R}}^{(k)} \equiv \left( \begin{array}{cc} h_{1}^{(k)} &{} 0 \\ 0 &{} h_{2}^{(k)} \\ \end{array}\right) \equiv \left( \begin{array}{cccc} \ddots &{} 0 &{} 0 &{} \cdots \\ 0 &{} h_{1}^{(k)} &{} 0 &{} \cdots \\ 0 &{} 0 &{} h_{2}^{(k)} &{} \cdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots \\ \end{array}\right) . \end{aligned}$$

The same notation applies to \(\rho ^{(k)}\), \(|\phi ^{(k)}\rangle\), \(|\varphi ^{(k)}\rangle\), etc. So, although, say \(|\varphi ^{(1)}\rangle\) and \(|\varphi ^{(2)}\rangle\) are, for calculational purposes, treated as 2-dimensional column matrices, their sum \(|\varphi ^{(1)}\rangle +|\varphi ^{(2)}\rangle\) is understood as a 4-dimensional column matrix. A mathematical purist would therefore rather write the sum as a direct sum. The convention we employ will not lead to ambiguities. In a two-dimensional space, all functions of the operator \(\rho ^{(k)}\) (which is not proportional to the identity operator, so has two different eigenvalues \(\lambda ^{(k)}_1\) and \(\lambda ^{(k)}_2\)) are equal to a linear function of \(\rho ^{(k)}\) by Cayley–Hamilton theorem (for details see “Appendix”),

$$\begin{aligned} f(\rho ^{(k)}) = \theta _1^{(k)} \rho ^{(k)} +{\theta _0}^{(k)}{} {\mathbf{R}}^{(k)}, \end{aligned}$$

where \(\theta _1^{(k)} = \frac{f(\lambda ^{(k)}_1 ) - f(\lambda ^{(k)}_2 )}{\lambda ^{(k)}_1 - \lambda ^{(k)}_2 }\) and \({\theta _0}^{(k)}=f(\lambda ^{(k)}_2 ) - \lambda ^{(k)}_2 \theta _1^{(k)}\). Note that although \(\lambda _j^{(k)}\) are time independent, the parameters \(\theta _j^{(k)}\) do depend on time if f itself is time dependent. Therefore, any such solution of (3.1) has the following form:

$$\begin{aligned} {\rho ^{(k)} }(t) = U^{(k)} {\rho ^{(k)} }(0) {U^{(k)}}^\dag = e^{-i\int _0^t \theta _1^{(k)} d\tau H^{(k)} } {\rho ^{(k)} }(0) e^{i\int _0^t \theta _1^{(k)} d\tau H^{(k)} }, \end{aligned}$$

and also

$$\begin{aligned} f({\rho ^{(k)} }(t)) = U^{(k)} f( {\rho ^{(k)} }(0)) {U^{(k)}}^\dag = e^{-i\int _0^t \theta _1^{(k)} d\tau H^{(k)} }f( {\rho ^{(k)} }(0)) e^{i\int _0^t \theta _1^{(k)} d\tau H^{(k)} }. \end{aligned}$$

Let us stress again that \(f( {\rho ^{(k)} }(0))\) is time-dependent because f is a polynomial in \({\rho ^{(k)} }(0)\), but with coefficients which depend on time. Therefore, for this case

$$\begin{aligned} f({\rho ^{(k)} }(t)) =e^{-i\int _0^t \theta _1^{(k)} d\tau H^{(k)} }[ \theta _1^{(k)}(t) \rho ^{(k)}(0) +{\theta _0}^{(k)}(t){\mathbf{R}}^{(k)}] e^{i\int _0^t \theta _1^{(k)} d\tau H^{(k)} }. \end{aligned}$$

It is convenient to rewrite the Lax pair on the subspace \({\mathcal{H}}^{(k)}={\mathbf{R}}^{(k)}{\mathcal{H}}\). First we use \(|\phi ^{(k)} \rangle = {U^{(k)}}^\dag |\varphi ^{(k)} \rangle = e^{i\int _0^t \theta _1^{(k)} d\tau H^{(k)} }|\varphi ^{(k)} \rangle\), so that

$$\begin{aligned} z_{\mu }|\varphi ^{(k)}(t) \rangle= & {} \,\left( \frac{1}{\mu }\rho ^{(k)}(t) - H^{(k)} \right) |\varphi ^{(k)}(t) \rangle \nonumber \\ i|{{\dot{\varphi }}}^{(k)}(t) \rangle= & {} \, \frac{1}{\mu }f(\rho ^{(k)}(t) )|\varphi ^{(k)}(t) \rangle , \end{aligned}$$
(26)

turns into

$$\begin{aligned} z_{\mu }|\phi ^{(k)}(t) \rangle= & {} \, \left( \frac{1}{\mu }{\rho ^{(k)} }(0)- H^{(k)} \right) |\phi ^{(k)} (t)\rangle \nonumber \\ i|{{\dot{\phi }}}^{(k)}(t)\rangle= & {} \, \left( \frac{1}{\mu }f({\rho ^{(k)} }(0)) - \theta _1^{(k)} H^{(k)} \right) |\phi ^{(k)} (t)\rangle \nonumber \\= & {} \, \left( \theta _1^{(k)}\left[ \frac{1}{\mu }{\rho ^{(k)} }(0) - H^{(k)}\right] + \frac{1}{\mu } {\theta _0}^{(k)} {\mathbf{R}}^{{\mathbf{(k)}}} \right) |\phi ^{(k)} (t)\rangle \nonumber \\= & {} \,\left( z_{\mu }\theta _1^{(k)} + \frac{{\theta _0}^{(k)}}{\mu }\right) |\phi ^{(k)} (t)\rangle . \end{aligned}$$
(27)

Solving (27) and using the relation between \(|\varphi ^{(k)} \rangle\) and \(|\phi ^{(k)}\rangle\) , we obtain

$$\begin{aligned} z_{\mu }|\phi ^{(k)} (0)\rangle= & {} \, \left( \frac{1}{\mu }{\rho ^{(k)} }(0)- H^{(k)} \right) |\phi ^{(k)} (0)\rangle \end{aligned}$$
(28)
$$\begin{aligned} |\varphi ^{(k)} (t)\rangle= & {} \, e^{-i\int _0^t \theta _1^{(k)} d\tau H^{(k)} } e^{-i \int _0^t [z_{\mu }\theta _1^{(k)} + \frac{{\theta _0}^{(k)}}{\mu }] d\tau } |\phi ^{(k)} (0)\rangle \end{aligned}$$
(29)
$$\begin{aligned}= & {} \, U^{(k)}(t) e^{u^{(k)}(t) +i v^{(k)}(t)} |\phi ^{(k)} (0)\rangle \end{aligned}$$
(30)

It is extremely important to realize that \(z_\mu\) and \(\mu\) are the same for all the subspaces indexed by k. This degeneracy of the eigenvalue problem was one of the crucial tricks that led in (Leble and Czachor 1998) to the discovery of self-scattering solutions. The same is here, but the necessity of maintaining the degeneracy is one of the difficulties one encounters when trying to employ the method in arbitrary dimensions, and for arbitrary H.

Since \(\mu\) and \(z_\mu\) are independent of k, any linear combination \(|\varphi (t)\rangle = \sum _k {\vartheta }^{(k)} |\varphi ^{(k)}(t)\rangle\) fulfils

$$\begin{aligned} z_{\mu }|\varphi (t) \rangle= & {} \, \left( \frac{1}{\mu }\rho - H\right) |\varphi (t) \rangle ,\\ i|{{\dot{\varphi }}}(t) \rangle= & {} \, \frac{1}{\mu }f(\rho )|\varphi (t) \rangle , \end{aligned}$$

and therefore can be used to build the projector P from the dressing transformation,

$$\begin{aligned} P(t)= & {} \,\frac{ |\varphi (t)\rangle \langle \varphi (t) |}{\langle \varphi (t)|\varphi (t)\rangle } \\= & {} \, \frac{ \sum _{l,k} {\vartheta }^{(k)} \overline{{\vartheta }^{(l)}}|\varphi ^{(k)}(t)\rangle \langle \varphi ^{(l)}(t)| }{\sum _k |{\vartheta }^{(k)}|^2\langle \varphi ^{(k)}(t)|\varphi ^{(k)}(t)\rangle }\\= & {} \,U(t) \sum _{l,k} c_{kl}(t) |\varphi ^{(k)}(0)\rangle \langle \varphi ^{(l)}(0)|U(t)^\dag , \end{aligned}$$

where \(U(t)= \sum _k U^{(k)}(t)\),

$$\begin{aligned} c_{kl}(t) = \frac{ {\vartheta }^{(k)} \overline{{\vartheta }^{(l)}} e^{[u^{(k)}(t) + u^{(l)}(t)] + i [v^{(k)}(t) - v^{(l)}(t)]} }{\sum _i |{\vartheta }^{(i)}|^2 e^{2u^{(i)}(t)}}, \end{aligned}$$
(31)

and we sum over all the blocks. U simultaneously generates the evolution of the seed solution \(\rho (t)= U(t)\rho (0)U(t)^\dag\). The difference between \(\rho (t)=\rho [0](t)\) and \(\rho [1](t)\) is precisely in the presence of nontrivial \(c_{kl}(t)\). The self-scattering phenomenon comes from \(c_{kl}(t)\). The essence of finding a nontrivial dressing transformation is in guaranteeing that \(c_{kl}(t)\) depend on time. Otherwise, the dynamics would be as linear as the one of the seed solution.

To construct the dressing transformation it is enough to find two-dimensional operators which fulfill (28) for fixed H, \(\mu\) and \(z_{\mu }\).

The matrix representation of \(\rho\) in the basis of eigenvectors of H looks as follows:

$$\begin{aligned} \rho= & {} \, \left( \begin{array}{cccc} \rho ^{(1)} &{} 0 &{} 0 &{} \cdots \\ 0 &{} \rho ^{(2)} &{} 0 &{} \cdots \\ 0 &{} 0 &{} \rho ^{(3)} &{} \cdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots \\ \end{array}\right) ,\\ \rho ^{(k)}= & {} \, {\mathbf{R}}^{(k)} \rho {\mathbf{R}}^{(k)} = \left( \begin{array}{cc} \rho _{1}^{(k)} &{} |c^{(k)}|e^{i\gamma ^{(k)}} \\ |c^{(k)}|e^{-i\gamma ^{(k)}} &{} \rho _{2}^{(k)} \\ \end{array}\right) \end{aligned}$$

Eigenvalue problem (28) implies two conditions:

$$\begin{aligned} |c^{(k)}|^2= & {} \, (\rho _{1}^{(k)} - x -\alpha h_{1}^{(k)})(\rho _{2}^{(k)} - x - \alpha h_{2}^{(k)}) - (\beta h_{1}^{(k)} + y)(\beta h_{2}^{(k)} + y),\\ 0= & {} \,(\rho _{1}^{(k)} - x - \alpha h_{1}^{(k)})(\beta h_{2}^{(k)} + y) + (\rho _{2}^{(k)} - x - \alpha h_{2}^{(k)})(\beta h_{1}^{(k)} + y), \end{aligned}$$

where \(\mu = \alpha + i\beta\) and \(\mu z_{\mu } = x+iy\). Note that \(\alpha\), \(\beta\), x, y are independent of k. The above two conditions fix two parameters of the \(2\times 2\) matrix \(\rho ^{(k)}\) as a function of \(H^{(k)}\), \(\mu\), \(z_{\mu }\) and \(\rho _{2}^{(k)}\):

$$\begin{aligned} |c^{(k)}|^2= & {} \, -\left[ \left( \frac{\rho _{2}^{(k)} - x - \alpha h_{2}^{(k)}}{\beta h_{2}^{(k)} + y}\right) ^2 +1\right] (\beta h_{1}^{(k)} + y)(\beta h_{2}^{(k)} + y), \end{aligned}$$
(32)
$$\begin{aligned} \rho _{1}^{(k)}= & {} \, x + \alpha h_{1}^{(k)} - (\rho _{2}^{(k)} - x - \alpha h_{2}^{(k)})\frac{\beta h_{1}^{(k)} + y}{\beta h_{2}^{(k)} + y}. \end{aligned}$$
(33)

The fourth parameter \(\gamma ^{(k)}\) remains undetermined. (32) implies that \((\beta h_{1}^{(k)} + y)(\beta h_{2}^{(k)} + y)\) has to be negative. It means that \(-\frac{y}{\beta }\) is between \(h_{1}^{(k)}\) and \(h_{2}^{(k)}\), for any k. It is easy to check that for any H we can also set all the parameters in such a way that \(\rho\) will be positive and normalized.

For such a \({\rho ^{(k)} }(0)\) the eigenvector from (28) is given by

$$\begin{aligned} |\phi ^{(k)} (0)\rangle = \frac{1}{\sqrt{\beta |h_1^{(k)}-h_2^{(k)}|}} \left( \begin{array}{c} \sqrt{|\beta h_2^{(k)} +y|}e^{i\gamma ^{(k)}} \\ \sqrt{|\beta h_1^{(k)} +y|} \frac{i-w^{(k)}}{\sqrt{(w^{(k)})^2 +1}} \\ \end{array}\right) \equiv \left( \begin{array}{c} \phi _1^{(k)} (0) \\ \phi _2^{(k)} (0) \\ \end{array}\right) , \end{aligned}$$
(34)

where

$$\begin{aligned} w^{(k)} = -\frac{\rho _2^{(k)}-\alpha h_2^{(k)}-x}{\beta h_2^{(k)} + y}. \end{aligned}$$
(35)

Now, we can use an equivalent form of the dressing transformation (Leble and Czachor 1998; Kuna et al. 1999; Czachor et al. 2000), \(\rho [1] = \rho + 2i\beta [P,H]\), and obtain

$$\begin{aligned} \rho [1](t) = U(t)\left( \rho (0) + 2i\beta \sum _{l,k=1}^n c_{kl}(t)\left[ |\varphi ^{(k)}(0)\rangle \langle \varphi ^{(l)}(0)|,H\right] \right) U(t)^\dag . \end{aligned}$$
(36)

The latter formula shows another condition one has to guarantee in order to make \(\rho [1](t)\) qualitatively different from \(\rho (t)\): the commutator at the right-hand side of (36) must be nonzero.

Representing \(\rho [1]\) in the bases of eigenvectors of H,

$$\begin{aligned} \rho [1] = \left( \begin{array}{cccc} \rho [1]^{(11)} &{} \rho [1]^{(12)} &{} \rho [1]^{(13)} &{} \cdots \\ \rho [1]^{(21)} &{} \rho [1]^{(22)} &{} \rho [1]^{(23)} &{} \cdots \\ \rho [1]^{(31)} &{} \rho [1]^{(32)} &{} \rho [1]^{(33)} &{} \cdots \\ \vdots &{} \vdots &{} \vdots &{} \ddots \end{array}\right) , \end{aligned}$$
(37)

we get the \(2\times 2\) blocks of the form

$$\begin{aligned} \rho [1]^{(kl)}= & {} \, 2i\beta c_{kl}\left( \begin{array}{cc} \phi _1^{(k)} (0)\overline{\phi _1^{(l)} (0)}(h_1^{(l)}- h_1^{(k)})e^{\omega _{11}^{(kl)}} &{} \phi _1^{(k)} (0)\overline{\phi _2^{(l)} (0)}(h_2^{(l)}- h_1^{(k)})e^{\omega _{12}^{(kl)}}\\ \phi _2^{(k)} (0)\overline{\phi _1^{(l)} (0)}(h_1^{(l)}- h_2^{(k)})e^{\omega _{21}^{(kl)}} &{} \phi _2^{(k)} (0)\overline{\phi _2^{(l)} (0)}(h_2^{(l)}- h_2^{(k)}) e^{\omega _{22}^{(kl)}} \end{array}\right) \nonumber \\= & {} \,\frac{ 2i \mathrm{sgn}(\beta )c_{kl}}{\sqrt{( h_1^{(k)} - h_2^{(k)})( h_1^{(l)} - h_2^{(l)})}}\left( \begin{array}{cc} r^{(kl)}_{11}e^{i(\gamma ^{(k)} - \gamma ^{(l)})} &{} r^{(kl)}_{12} \frac{-(w^{(l)}+i)e^{i\gamma ^{(k)} }}{\sqrt{(w^{(l)})^2 +1}} \\ r^{(kl)}_{21}\frac{(i - w^{(k)})e^{-i\gamma ^{(l)} }}{\sqrt{(w^{(k)})^2 +1}} &{} r^{(kl)}_{22} \frac{-(i - w^{(k)})(w^{(l)}+i)}{\sqrt{(w^{(l)})^2 +1}\sqrt{(w^{(k)})^2 +1}} \end{array}\right) , \end{aligned}$$
(38)

with \(c_{kl}\) given by (31),

$$\begin{aligned} r^{(kl)}_{ij}= & {} \, \sqrt{|\beta h_{\sigma (i)}^{(k)} + y||\beta h_{\sigma (j)}^{(l)} +y|}( h_j^{(l)} - h_i^{(k)})e^{-i\omega _{ij}^{(kl)}}, \end{aligned}$$
(39)
$$\begin{aligned} & \omega _{ij}^{(kl)}= {} \, \int _0^t(\theta _1^{(k)}h^{(k)}_i- \theta _1^{(l)}h^{(l)}_j) d\tau , \end{aligned}$$
(40)

\(\sigma (i)\) an odd permutation of \(i\in \{ 1,2\}\), and

$$\begin{aligned} \rho [1]^{(kk)}= & {} \left( \begin{array}{cc} \alpha h_1^{(k)} +x +w^{(k)}s^{(k)} &{} s^{(k)}(1+\frac{2i}{w^{(k)}-i}c_{kk})e^{i\gamma ^{(k)}}e^{-i\omega _{12}^{(kk)}}\\ s^{(k)}(1-\frac{2i}{w^{(k)}+i}c_{kk})e^{-i\gamma ^{(k)}}e^{-i\omega _{21}^{(kk)}} &{} \rho _2^{(k)} \end{array}\right) , \end{aligned}$$
(41)

where \(s^{(k)}=\sqrt{((w^{(k)})^2 +1)|\beta h_1^{(k)} +y||\beta h_2^{(k)} +y|}\).

All these blocks can consist of nonzero elements, leading to the coupling between all the pairs of species in a given population. Note that the construction does not depend on the number of species.

3.2 Example: \(3\times 3\) \(\rho [1](t)\) Constructed from a Single \(2\times 2\) Seed Block

We are in position to build a wide variety of solutions to a large class of problems. Of course, the formulas describing a general case are quite complicated. So, let us simplify the discussion by setting \(\mu = i\beta\), \(\mu z_{\mu } = iy\) (thus \(\alpha =x=0\)). Now \(\beta h_{1}^{(k)} + y>0\), \(\beta h_{2}^{(k)} + y<0\) and we obtain a simple \(2\times 2\) block

$$\begin{aligned} \rho ^{(k)} = \left( \begin{array}{cc} 0&{}\sqrt{-(\beta h_{1}^{(k)} + y)(\beta h_{2}^{(k)} + y)}e^{i\gamma ^{(k)}}\\ \sqrt{-(\beta h_{1}^{(k)} + y)(\beta h_{2}^{(k)} + y)}e^{-i\gamma ^{(k)}} &{}0 \end{array} \right) . \end{aligned}$$

which is Hermitian but not positive. We can use this block for constructing the transformation in an even-dimensional case. Let us skip the index k. We can make the seed solution odd-dimensional by adding the 1-dimensional block \(\rho ^{(2)} = 0\), implying \(y=-\beta h_3\) because (28) becomes a number relation between \(\mu\) and \(z_{\mu }\) for \(\alpha =x=0\). We assume \(\beta >0\), therefore \(h_{1}>h_{3}>h_{2}\). Under all these assumptions our seed solution becomes

$$\begin{aligned} \rho = \left( \begin{array}{ccc} 0&{}\sqrt{\beta ^2 (h_1 - h_3)(h_3 - h_2)}e^{i\phi _1}&{}0\\ \sqrt{\beta ^2 (h_1 - h_3)(h_3 - h_2)}e^{-i\phi _1} &{}0&{}0\\ 0&{}0&{}0 \end{array} \right) . \end{aligned}$$

To make our example yet more explicit we use \(f(\rho )= F(t)\rho ^2\) for which our \(\rho\) is a constant solution because of \([H,\rho ^2 ]=0\). The dressing transformation produces

$$\begin{aligned} \rho [1]= & {} \, \beta \sqrt{ (h_1 - h_3)(h_3 - h_2)} \\&\times \, \left( \begin{array}{ccc} 0&{} -e^{i\phi _1}\left( 1-\frac{2 |a_2|^2 }{\chi (t)} \right) &{}\frac{-2ie^{\psi (t) } a_1\overline{a_2}e^{i\phi _1}\sqrt{h_1 - h_3}}{\chi (t)\sqrt{ h_1 - h_2}}\\ -e^{-i\phi _1}\left( 1-\frac{2 |a_2|^2 }{\chi (t)} \right) &{}0&{}\frac{-2e^{\psi (t) } a_1\overline{a_2}\sqrt{h_3 - h_2}}{\chi (t)\sqrt{ h_1 - h_2}}\\ \frac{2ie^{\psi (t) } a_2\overline{a_1}e^{-i\phi _1}\sqrt{h_1 - h_3}}{\chi (t)\sqrt{ h_1 - h_2}}&{}\frac{-2e^{\psi (t) } a_2\overline{a_1}\sqrt{h_3 - h_2}}{\chi (t)\sqrt{ h_1 - h_2}}&{}0 \end{array} \right) , \end{aligned}$$

where \(\psi (t) = -\beta (h_1 - h_3)( h_3 - h_2)\int _0^t F(s)ds\) and \(\chi (t) = |a_1|^2e^{ 2\psi (t) }+|a_2|^2\).

Now, we use this simple traceless and non-positive \(3\times 3\) matrix to construct a density matrix (i.e. a positive solution with \(\,{\text {Tr}}\,\rho =1\)). Let us first see what happens if we just add to \(\rho\) a normalized multiple of I: \(\sigma = \rho +\frac{1}{3}I\), \(\,{\text {Tr}}\,\rho =0\), \(\,{\text {Tr}}\,\sigma =1\). The equation is

$$\begin{aligned} i{{\dot{\rho }}}= & {} \, i{{\dot{\sigma }}} = [H,g(\sigma )] = [H,\theta _2 \sigma ^2 + \theta _1 \sigma + \theta _0 I] = [H,\theta _2 \sigma ^2 + \theta _1 \sigma ]\\= & {} \,[H,\theta _2 (\rho +\frac{1}{3}I)^2 + \theta _1 (\rho +\frac{1}{3}I) ] = [H,\theta _2 \rho ^2 + (\theta _1 +\frac{2}{3}\theta _2)\rho ] = [H,f(\rho )] \end{aligned}$$

where we have used again the Cayley–Hamilton theorem, describing f and g as a polynomial of a matrix. So, if we want to find a solution of \(i{\dot{\sigma }} = [H,g(\sigma )]\) for a density matrix, we should find a traceless solution of \(i{\dot{\rho }}= [H,\theta _2 \rho ^2 + (\theta _1 +\frac{2}{3}\theta _2)\rho ]\).

We know how to find a traceless solution of the problem with \(f(\varrho ) = F(t)\varrho ^2\), but it is easy to verify that \(\rho (t)= \exp (-i\int _0^t(\theta _1 +\frac{2}{3}\theta _2)d\tau H )\varrho (t) \exp (i\int _0^t(\theta _1 +\frac{2}{3}\theta _2)d\tau H )\) is a solution of \(i{\dot{\rho }}= [H,\theta _2 \rho ^2 + (\theta _1 +\frac{2}{3}\theta _2)\rho ]\) if \(\varrho\) is a solution of \(i{\dot{\varrho }} = [H,\theta _2 \varrho ^2]\).

For our concrete example g and H are fixed, and we know that the eigenvalues of \(\sigma\) are: \(\lambda _{1} = \frac{1}{3} + \sqrt{\beta ^2 (h_1 - h_3)( h_3 - h_2)}\equiv \frac{1}{3} + T\), \(\lambda _{2} = \frac{1}{3} - \sqrt{\beta ^2 (h_1 - h_3)( h_3 - h_2)} \equiv \frac{1}{3} - T\), \(\lambda _{3} = \frac{1}{3}\). Because we are interested in positive matrices we select parameters so that \(T<\frac{1}{3}\). The coefficients \(\theta _1\) and \(\theta _2\) can be computed from

$$\begin{aligned} \theta _1= & {} \, \frac{(\lambda _2+\lambda _1)(g(\lambda _2)- g(\lambda _1))}{(\lambda _2-\lambda _1)(\lambda _2-\lambda _3)} - \frac{(\lambda _3+\lambda _1)(g(\lambda _3)- g(\lambda _1))}{(\lambda _3-\lambda _1)(\lambda _2-\lambda _3)}\\= & {} \, \frac{g(\lambda _2)- g(\lambda _1)}{3T^2} - \frac{(\frac{2}{3} + T)(g(\lambda _3)- g(\lambda _1))}{T^2},\\ \theta _2= & {} \, \frac{g(\lambda _2)- g(\lambda _1)}{(\lambda _2-\lambda _1)(\lambda _2-\lambda _3)} - \frac{g(\lambda _3)- g(\lambda _1)}{(\lambda _3-\lambda _1)(\lambda _2-\lambda _3)}= \frac{g(\lambda _2)+ g(\lambda _1)-2g(\lambda _3)}{2T^2}, \end{aligned}$$

and then

$$\begin{aligned} \theta _1 +\frac{2}{3}\theta _2= & {} \left( g(\lambda _2)- g(\lambda _1)\right) \frac{2}{3T^2} + \left( g(\lambda _1)- g(\lambda _3)\right) \frac{\frac{4}{3} + T}{T^2}. \end{aligned}$$
(42)

As a result, we obtain the density matrix which solves \(i{{\dot{\rho }}} = [H,g(\rho )]\) for arbitrary H and g:

$$\begin{aligned} \rho = \left( \begin{array}{ccc} \frac{1}{3}&{} A &{} B\\ {\bar{A}} &{} \frac{1}{3} &{} C\\ {\bar{B}} &{} {\bar{C}} &{} \frac{1}{3}\\ \end{array}\right) \end{aligned}$$

where

$$\begin{aligned} A= & {} \, -e^{i\phi _1}\beta \sqrt{ (h_1 - h_3)(h_3 - h_2)}\left( 1-\frac{2 |a_2|^2 }{\chi (t)} \right) e^{i\kappa (h_1 - h_2)}, \end{aligned}$$
(43)
$$\begin{aligned} B= & {} \, \frac{-2ie^{\psi (t) }e^{i\kappa (h_1 - h_3)}\beta a_1\overline{a_2}e^{i\phi _1}(h_1 - h_3)\sqrt{h_3 - h_2}}{\chi (t)\sqrt{ h_1 - h_2}}, \end{aligned}$$
(44)
$$\begin{aligned} C= & {} \, \frac{-2e^{\psi (t) } e^{i\kappa (h_2 - h_3)}\beta a_1\overline{a_2}(h_3 - h_2)\sqrt{h_1 - h_3}}{\chi (t)\sqrt{ h_1 - h_2}}, \end{aligned}$$
(45)

with \(\kappa = -\int _0^t(\theta _1 +\frac{2}{3}\theta _2)d\tau\), \(\psi (t) = -\beta (h_1 - h_3)( h_3 - h_2)\int _0^t \theta _2(s)ds\). The general form of solution we have given in the previous section is much more complex and flexible from the point of view of modeling, but our simplified example is easier for further analysis.

Let us finally write the associated set of rate equations:

$$\begin{aligned} {\dot{p}}_{12}= & {} \, \left[ \left( \theta _1 +\frac{2}{3}\theta _2\right) \left( p'_{12}-\frac{1}{3}\right) +\theta _2\left( \left( p'_{13}- \frac{1}{3}\right) \left( p_{23}- \frac{1}{3}\right) - \left( p_{13}- \frac{1}{3}\right) \left( p'_{23}-\frac{1}{3}\right) \right) \right] (h_1 - h_2)\\ \dot{p'}_{12}= & {} \,\left[ \theta _2\left( \left( p_{13}-\frac{1}{3}\right) (p_{23}- p) + \left( p'_{13}-\frac{1}{3}\right) (p'_{33}- p)\right) - \left( \theta _1 +\frac{2}{3}\theta _2\right) \left( p_{12}-\frac{1}{3}\right) \right] (h_1 - h_2)\\ {\dot{p}}_{13}= & {} \, \left[ \left( \theta _1 +\frac{2}{3}\theta _2\right) \left( p'_{13}-\frac{1}{3}\right) +\theta _2\left( \left( p_{12}-\frac{1}{3}\right) \left( p'_{23}-\frac{1}{3}\right) - \left( p'_{12}-\frac{1}{3}\right) \left( p_{23}-\frac{1}{3}\right) \right) \right] (h_1 - h_3)\\ \dot{p'}_{13}= & {} \, \left[ \theta _2\left( \left( p_{12}-\frac{1}{3}\right) \left( p_{23}-\frac{1}{3}\right) - \left( p'_{12}-\frac{1}{3}\right) \left( p'_{23}-\frac{1}{3}\right) \right) - \left( \theta _1 +\frac{2}{3}\theta _2\right) \left( p_{13}-\frac{1}{3}\right) \right] (h_1 - h_3)\\ {\dot{p}}_{23}= & {} \,\left[ \left( \theta _1 +\frac{2}{3}\theta _2\right) \left( p'_{23}-\frac{1}{3}\right) +\theta _2\left( \left( p_{12}-\frac{1}{3}\right) \left( p'_{13}-\frac{1}{3}\right) - \left( p'_{12}-\frac{1}{3}\right) \left( p_{13}-\frac{1}{3}\right) \right) \right] (h_2 - h_3)\\ \dot{p'}_{23}= & {} \,\left[ \theta _2\left( \left( p_{12}-\frac{1}{3}\right) \left( p_{13}-\frac{1}{3}\right) - \left( p'_{12}-\frac{1}{3}\right) \left( p'_{13}-\frac{1}{3}\right) \right) - \left( \theta _1 +\frac{2}{3}\theta _2\right) \left( p_{23}-\frac{1}{3}\right) \right] (h_2 - h_3) \end{aligned}$$

Since \(C = i\sqrt{\frac{h_3-h_2}{h_1-h_3}}Be^{i[\kappa (h_2 - h_1) - \phi _1]}\) one can replace this system of six equations for catalytic processes by four equations for \(p_{12}\), \(p_{13}\), \(p'_{12}\), \(p'_{13}\), involving auto-catalytic terms and new time dependent coefficients. The form of the rate equations explains why the eigenvalues of H effectively encode the kinetic constants of the dynamics, here \(k_{ij}=h_i-h_j\).

3.2.1 \(g(\rho ) = \rho \sin \rho\)

Take \(g(\rho ) =g_1(\rho ) = \rho \sin \rho\),

$$\begin{aligned} i{{\dot{\rho }}}= & {} [H,\rho \sin \rho ]. \end{aligned}$$
(46)

The function itself is time independent, so after explicit integrations one finds

$$\begin{aligned} \psi _1(t)= & {} -\frac{t}{2\beta } \left( \left( \frac{1}{3} + T\right) \sin \left( \frac{1}{3} + T\right) + \left( \frac{1}{3} - T\right) \sin \left( \frac{1}{3} - T\right) -\frac{2}{3} \sin \frac{1}{3}\right) \\ \kappa _1(t)= & {} -\frac{2t}{3T^2}\left( \left( \frac{1}{3} - T\right) \sin \left( \frac{1}{3} - T\right) - \left( \frac{1}{3} + T\right) \sin \left( \frac{1}{3} + T\right) \right) \\&\quad -\frac{(4/3+T)t}{T^2}\left( \left( \frac{1}{3} + T\right) \sin \left( \frac{1}{3} + T\right) -\frac{1}{3}\sin \frac{1}{3} \right) . \end{aligned}$$

\(p_{12}\), \(p_{13}\), \(p'_{12}\), \(p'_{13}\) are plotted in Fig. 2, where \(\psi _1(t)\) and \(\kappa _1(t)\) are defined after (45).

Fig. 2
figure 2

Dynamics of the four populations \(p_{12}\) (green), \(p_{13}\) (blue), \(p'_{12}\) (red), \(p'_{13}\) (yellow), for time-independent \(g_1(\rho ) = \rho \sin (\rho )\). The top plot: \(h_1=2\), \(h_2=1\), \(h_3=4\), \(a_1=1+2i\), \(a_2=2+3i\), \(\beta =0.01\), \(\phi _1=1\). In the lower plots we change a single parameter with respect to the top one: \(\beta =0.001\) (middle), \(a_2=0.1\) (lowest). The pairs red–green and blue–yellow exhibit a typical predator–prey, or species-resources Volterra-type shift of oscillation. The system can be interpreted as consisting of two species functioning in two niches, which are nevertheless not completely isolated from one another. The reduction from six to four variables, for the price of making some coefficients time dependent, turns the remaining two populations \(p_{23}\), \(p'_{23}\) into an effective environment for \(p_{12}\), \(p_{13}\), \(p'_{12}\), \(p'_{13}\). (Color figure online)

3.2.2 \(g(\rho ) = {{\dot{\omega }}}(t)\rho \sin (\omega (t)\rho )\)

The second example involves an explicitly time dependent function \(g(\rho ) = g_2(\rho ) = {{\dot{\omega }}}(t)\rho \sin (\omega (t)\rho )\). Then

$$\begin{aligned} i{{\dot{\rho }}}= & {} [H,{{\dot{\omega }}}(t)\rho \sin (\omega (t)\rho )]. \end{aligned}$$
(47)

After integration,

$$\begin{aligned} \psi _2(t)= & {} \frac{1}{2\beta }\left( \cos \left[ \left( \frac{1}{3} + T\right) \omega (t)\right] + \cos \left[ \left( \frac{1}{3} - T\right) \omega (t)\right] -2\cos \frac{\omega (t)}{3} \right) \\ \kappa _2(t)= & {} \frac{2}{3T^2}\left( \cos \left[ \left( \frac{1}{3} - T\right) \omega (t)\right] - \cos \left[ \left( \frac{1}{3} + T\right) \omega (t)\right] \right) \\&\quad +\,\frac{4/3+T}{T^2}\left( \cos \left[ \left( \frac{1}{3} + T\right) \omega (t)\right] -\cos \frac{\omega (t)}{3}\right) . \end{aligned}$$

Let us see what kind of a dynamics one gets for the simplest, linear time dependence \(\omega (t)=\omega t\). The four kinetic variables are shown at Fig. 3.

Fig. 3
figure 3

\(g_2(\rho ) = \dot{\omega (t)}\rho \sin (\omega (t)\rho )\) for \(\omega (t)=\omega t\), \(\omega =1\). The remaining parameters the same as in Fig. 2

3.3 Dynamics of 30 Interacting Species: Seed \(\rho\) with Three \(2\times 2\) Blocks

In order to obtain a more complicated solution, but still of a reasonably compact form, we put \(w^{(k)}=0\) in the general formula (35). The two-dimensional blocks are as follows

$$\begin{aligned} \rho ^{(k)} = \left( \begin{array}{cc} x+\alpha h^{(k)}_{1}&{}\sqrt{|\beta h^{(k)}_{1} + y||\beta h^{(k)}_{2} + y|}e^{i\phi ^{(k)}}\\ \sqrt{|\beta h^{(k)}_{1} + y||\beta h^{(k)}_{2} + y|}e^{-i\phi ^{(k)}} &{}x+\alpha h^{(k)}_{2}. \end{array} \right) , \end{aligned}$$

with the eigenvalues

$$\begin{aligned} \lambda ^{(k)}_{1}= & {} \, x + \frac{\alpha (h^{(k)}_{1}+ h^{(k)}_{2})+\sqrt{\alpha ^2(h^{(k)}_{1}- h^{(k)}_{2})^2+4|\beta h^{(k)}_{1} + y||\beta h^{(k)}_{2} + y|}}{2},\\ \lambda ^{(k)}_{2}= & {} \, x + \frac{\alpha (h^{(k)}_{1}+ h^{(k)}_{2})-\sqrt{\alpha ^2(h^{(k)}_{1}- h^{(k)}_{2})^2+4|\beta h^{(k)}_{1} + y||\beta h^{(k)}_{2} + y|}}{2}. \end{aligned}$$

Recall that \(\alpha\), \(\beta\), x, y are k-independent. Now, take positive x, \(\alpha\), and \(h_i^{(k)}\). Then \(\mathrm{Tr}(\rho ^{(k)})= 2x +\alpha (h^{(k)}_{1}+ h^{(k)}_{2})>0\). Because in this case \(y\beta <0\),

$$\begin{aligned} \mathrm{det}(\rho ^{(k)})= & {} \, (x+\alpha h^{(k)}_{1})(x+\alpha h^{(k)}_{2})-|\beta h^{(k)}_{1} + y||\beta h^{(k)}_{2} + y|\\= & {} \, x^2 +y^2+h^{(k)}_{1} h^{(k)}_{2}(\alpha ^2+\beta ^2) +(x\alpha +y\beta )(h^{(k)}_{1}+ h^{(k)}_{2}), \end{aligned}$$

so \(\rho ^{(k)}\) becomes positive if \(x\alpha >|y\beta |\).

The solution we produce from this seed solution is a little less complicated than the general one. For \(k\ne l\),

$$\begin{aligned} \rho [1]^{(kl)}= & {} \, \frac{ 2i \mathrm{sgn}(\beta )c_{kl}}{\sqrt{( h_1^{(k)} - h_2^{(k)})( h_1^{(l)} - h_2^{(l)})}}\left( \begin{array}{cc} r^{(kl)}_{11}e^{i(\gamma ^{(k)} - \gamma ^{(l)})} &{} -ir^{(kl)}_{12} e^{i\gamma ^{(k)} } \\ ir^{(kl)}_{21}e^{-i\gamma ^{(l)} } &{} r^{(kl)}_{22} \\ \end{array}\right) , \end{aligned}$$

where

$$\begin{aligned} r^{(kl)}_{ij}= & {} \, \sqrt{|\beta h_{\sigma (i)}^{(k)} + y||\beta h_{\sigma (j)}^{(l)} +y|}( h_j^{(l)} - h_i^{(k)})e^{-i\omega _{ij}^{(kl)}},\\ \omega _{ij}^{(kl)}= & {} \,\int _0^t(\theta _1^{(k)}h_i^{(k)}- \theta _1^{(l)}h_j^{(l)}) d\tau , \end{aligned}$$

(again, \(\sigma (i)\) is an odd permutation of \(i\in \{ 1,2\}\)). For \(k=l\),

$$\begin{aligned} \rho [1]^{(kk)}= & {} \, \left( \begin{array}{cc} \alpha h_1^{(k)} +x &{} s^{(k)}(1-2c_{kk})e^{i\gamma ^{(k)}}e^{-i\omega _{12}^{(kk)}} \\ s^{(k)}(1-2c_{kk})e^{-i\gamma ^{(k)}}e^{-i\omega _{21}^{(kk)}} &{} \alpha h_1^{(k)} +x \\ \end{array}\right) , \end{aligned}$$

where \(s^{(k)}=\sqrt{|\beta h_1^{(k)} +y||\beta h_2^{(k)} +y|}\), \(c_{kl} = \frac{ {\vartheta }^{(k)} \overline{{\vartheta }^{(l)}} e^{[u^{(k)}(t) + u^{(l)}(t)] + i [v^{(k)}(t) - v^{(l)}(t)]} }{\sum _i |{\vartheta }^{(i)}|^2 e^{2u^{(i)}(t)}}\). Explicit forms of \(u^{(k)}(t)\) and \(v^{(k)}(t)\) are given by

$$\begin{aligned} u^{(k)}(t) +i v^{(k)}(t)= & {} \, \frac{\alpha [ f(\lambda ^{(k)}_2)(\lambda ^{(k)}_1 -x) + (x - \lambda ^{(k)}_2) f(\lambda ^{(k)}_1 )] +\beta y [f(\lambda ^{(k)}_1 ) - f(\lambda ^{(k)}_2 )]}{(\alpha ^2+\beta ^2)(\lambda ^{(k)}_1 - \lambda ^{(k)}_2) } \\& +\,i \frac{y\alpha [ f(\lambda ^{(k)}_1 ) - f(\lambda ^{(k)}_2 )] -\beta [f(\lambda ^{(k)}_2)(\lambda ^{(k)}_1 -x) + (x - \lambda ^{(k)}_2) f(\lambda ^{(k)}_1 )] }{(\alpha ^2+\beta ^2)(\lambda ^{(k)}_1 - \lambda ^{(k)}_2) } \end{aligned}$$

Now take a seed \(\rho\) consisting of three two-dimensional blocks. \(\rho [1]\) is \(6\times 6\), and consists of nine, nonzero \(2\times 2\) blocks \(\rho [1]^{(kl)}\), \(k,l=1,2,3\). A practical advice in combining the blocks is to keep in mind that the denominators in \(c_{kl}\) are the same for all kl, and involve the sum over k from \(k=1\) to \(k=3\). For example,

$$\begin{aligned} c_{12} = \frac{ {\vartheta }^{(1)} \overline{{\vartheta }^{(2)}} e^{[u^{(1)}(t) + u^{(2)}(t)] + i [v^{(1)}(t) - v^{(2)}(t)]} }{ |{\vartheta }^{(1)}|^2 e^{2u^{(1)}(t)}+|{\vartheta }^{(2)}|^2 e^{2u^{(2)}(t)}+|{\vartheta }^{(3)}|^2 e^{2u^{(3)}(t)}}. \end{aligned}$$

Note the presence of \(|{\vartheta }^{(3)}|^2 e^{2u^{(3)}(t)}\) even though the block itself is indexed by 1,2. Secondly, the contribution from \(c_{kl}\) enters all the matrix elements of \(\rho [1]\), with the exception of the main diagonal. This is why all the species described by \(\rho [1]\) interact with one another.

In order to obtain a density matrix we select \(\alpha\) in such a way that \(\alpha \sum _{k=1}^3 (h^{(k)}_{1}+ h^{(k)}_{2} )<1\), then we put \(x = \frac{1-\alpha \sum _{k=1}^3 (h^{(k)}_{1}+ h^{(k)}_{2})}{2}\).

3.3.1 \(f(\rho )= F(t)\rho ^2\)

Let us again assume that the coupling with environment is given by some explicit time-dependent function, say \(f(\rho )= F(t)\rho ^2\). Then \(\theta _1^{(k)} = F(t)(\lambda ^{(k)}_1+ \lambda ^{(k)}_2)\), \(\theta _0^{(k)}=-F(t)\lambda ^{(k)}_1 \lambda ^{(k)}_2\),

$$\begin{aligned} u^{(k)}(t) +i v^{(k)}(t)= & {} \, -i \int _0^t [z_{\mu }\theta _1^{(k)} + \frac{\theta _0^{(k)}}{\mu }] d\tau \\= & {} \,\int _0^t F(\tau ) d\tau \left[ \frac{\beta (y^2-x^2) +2\alpha yx }{\alpha ^2+\beta ^2} + \beta h^{(k)}_{1}h^{(k)}_{2} + y(h^{(k)}_{1} + h^{(k)}_{2} ) \right] \\& +\,i\int _0^t F(\tau ) d\tau \left[ \frac{\alpha (x^2-y^2) + 2\beta yx}{\alpha ^2+\beta ^2} -\alpha h^{(k)}_{1}h^{(k)}_{2}\right] ,\\ \end{aligned}$$
$$\begin{aligned} c_{kl}= & {} \,\frac{ {\vartheta }^{(k)} \overline{{\vartheta }^{(l)}} e^{\int _0^t F(\tau ) d\tau [ \beta (h^{(k)}_{1}h^{(k)}_{2}+h^{(l)}_{1}h^{(l)}_{2}) + y(h^{(k)}_{1} + h^{(k)}_{2}+h^{(l)}_{1} + h^{(l)}_{2} )-i\alpha ( h^{(k)}_{1}h^{(k)}_{2}- h^{(l)}_{1}h^{(l)}_{2}) ] }}{\sum _i |{\vartheta }^{(i)}|^2 e^{\int _0^t F(\tau ) d\tau [ 2\beta h^{(i)}_{1}h^{(i)}_{2} + 2y(h^{(i)}_{1} + h^{(i)}_{2} )]}}\\ \omega _{ij}^{(kl)}= & {} \, \int _0^t F(\tau ) d\tau \left[ 2x(h_i^{(k)}- h_j^{(l)})+\alpha \left[(h^{(k)}_{1} + h^{(k)}_{2} )h_i^{(k)}- (h^{(l)}_{1} + h^{(l)}_{2} )h_j^{(l)} \right]\right] \end{aligned}$$

The associated set of rate equations involves of 36 populations, but clarity of presentation will not increase by writing down all the 30 time-dependent functions (the ‘diagonal’ populations \(p_{1}, \dots ,p_{6}\) are constant if one works in the basis of eigenvectors of H). Yet, in order to get some flavor of the solution let us show at least some of them:

$$\begin{aligned} p_{12}= & {} \, x+\frac{\alpha }{2}(h^{(1)}_{1}+ h^{(1)}_{2})+ \sqrt{|\beta h_1^{(1)} +y||\beta h_2^{(1)} +y|}\left( 1-\frac{ 2 |{\vartheta }^{(1)}|^2 e^{2u^{(1)}(t)} }{\sum _i |{\vartheta }^{(i)}|^2 e^{2u^{(i)}(t)}}\right) \cos (\omega _{12}^{(11)}-\gamma ^{(1)})\\ p'_{12}= & {} \, x+\frac{\alpha }{2}(h^{(1)}_{1}+ h^{(1)}_{2})- \sqrt{|\beta h_1^{(1)} +y||\beta h_2^{(1)} +y|}\left( 1-\frac{ 2 |{\vartheta }^{(1)}|^2 e^{2u^{(1)}(t)} }{\sum _i |{\vartheta }^{(i)}|^2 e^{2u^{(i)}(t)}}\right) \sin (\omega _{12}^{(11)}-\gamma ^{(1)})\\ p_{13}= & {} \, x +\frac{\alpha }{2}(h^{(1)}_{1}+ h^{(2)}_{1})+\frac{ 2 \mathrm{sgn}(\beta ){\vartheta }^{(1)} \overline{{\vartheta }^{(2)}} e^{[u^{(1)}(t) + u^{(2)}(t)] }}{\sqrt{( h_1^{(1)} - h_2^{(1)})( h_1^{(2)} - h_2^{(2)})}\sum _i |{\vartheta }^{(i)}|^2 e^{2u^{(i)}(t)}}\\&\times \,\sqrt{|\beta h_2^{(1)} + y||\beta h_2^{(2)} +y|}( h_1^{(2)} - h_1^{(1)})\sin (\omega _{11}^{(12)}-[v^{(1)}(t) - v^{(2)}(t)]-(\gamma ^{(1)} - \gamma ^{(2)}))\\ p'_{13}= \,& {} x +\frac{\alpha }{2}(h^{(1)}_{1}+ h^{(2)}_{1})+\frac{ 2 \mathrm{sgn}(\beta ){\vartheta }^{(1)} \overline{{\vartheta }^{(2)}} e^{[u^{(1)}(t) + u^{(2)}(t)] }}{\sqrt{( h_1^{(1)} - h_2^{(1)})( h_1^{(2)} - h_2^{(2)})}\sum _i |{\vartheta }^{(i)}|^2 e^{2u^{(i)}(t)}}\\&\times \,\sqrt{|\beta h_2^{(1)} + y||\beta h_2^{(2)} +y|}( h_1^{(2)} - h_1^{(1)})\cos (\omega _{11}^{(12)}-[v^{(1)}(t) - v^{(2)}(t)]-(\gamma ^{(1)} - \gamma ^{(2)})) \end{aligned}$$

The dynamics of all the 30 populations is illustrated in Fig. 4 for a simple ‘seasonal’ change of coupling of the species with their environment, \(F(t)=\sin \omega t\). Fig. 5 shows what happens if one takes a non-periodic \(F(t)=\sinh \omega t\). Of course, the solution is valid for any F(t).

Fig. 4
figure 4

30 populations for \(f(\rho ) = \sin (\omega t) \rho ^2\), \(h_1=0.8\), \(h_2=0.4\), \(h_3=0.7\), \(h_4=0.3\), \(h_5=0.6\), \(h_6=0.2\), \(\vartheta ^{(1)}=1+i\), \(\vartheta ^{(2)}=2+i\), \(\vartheta ^{(3)}=3+i\), \(\alpha =0.2\), \(\beta =1\), \(\omega =0.2\), \(\gamma _1=20\), \(\gamma _2=30\), \(\gamma _3=40\). The solution \(\rho\) is normalized by \(\,{\text {Tr}}\,\rho =1\). Note that the sum of all the 30 probabilities exceeds 1. This shows that the probabilities correspond to several maximal sets, involving simultaneously different contexts for different collections of populations

Fig. 5
figure 5

30 populations for \(f(\rho ) = \sinh (\omega t) \rho ^2\), the remaining parameters as in Fig. 4. Note the change of time scale. For short times the evolutions are similar for both \(\sin \omega t\) and \(\sinh \omega t\)

3.4 Building Seed Solutions with \(3\times 3\) Blocks

In one of our previous examples the seed solution for a \(3\times 3\)\(\rho\) was constructed by means of a \(2\times 2\) block, trivially extended to \(3\times 3\) by adding a column and row consisting of zeros. Here we explicitly construct a less trivial \(3\times 3\) block. Of crucial importance is again the degeneracy condition, which means that the seed \(\rho ^{(k)}\) have to correspond to the same \(\mu\) and \(z_\mu\) for all k. Otherwise one would not be able to combine \(\rho ^{(k)}\) from different blocks, acting in different invariant subspaces of H.

Let us start with a Hermitian \(3\times 3\) matrix

$$\begin{aligned} \rho= & {} \left( \begin{array}{lcr} \rho _1 &{}a &{}b\\ {\bar{a}} &{}\rho _2 &{}c\\ {\bar{b}} &{}{\bar{c}} &{}\rho _3 \end{array}\right) . \end{aligned}$$

The equation

$$\begin{aligned} i{\dot{\rho }} = [H,\theta _2 \rho ^2 + \theta _1 \rho ] \end{aligned}$$
(48)

is equivalent to

$$\begin{aligned} {{\dot{\rho }}}_1= & {} \, \dot{\rho _2} = \dot{\rho _3} = 0,\\ i{\dot{a}}= & {} \,(h_1-h_2)[(\rho _1 +\rho _2)\theta _2 + \theta _1]a + \theta _2(h_1-h_2)b{\bar{c}} ,\\ i{\dot{b}}= & {} \,(h_1-h_3)[(\rho _1 +\rho _2)\theta _2 + \theta _1]b + \theta _2(h_1-h_3)ac ,\\ i{\dot{c}}= & {} \,(h_2-h_3)[(\rho _1 +\rho _2)\theta _2 + \theta _1]c + \theta _2(h_2-h_3){\bar{a}}b, \end{aligned}$$

a dynamical system formally similar to Euler’s equations from classical mechanics of a rigid body (the ‘Euler-Arnold top’ (Arnold 1989) see also (Czachor et al. 2000)). Let us now find the dynamics of modules and phases of the matrix elements:

$$\begin{aligned} |a|^2 \frac{d}{dt}{\arg (a)}= & {} \, -(h_1-h_2)[(\rho _1 +\rho _2)\theta _2 + \theta _1]|a|^2 - t_{23}\mathrm{Re}(a{\bar{b}}c),\\ |b|^2 \frac{d}{dt}{\arg (b)}= & {} \, -(h_1-h_3)[(\rho _1 +\rho _3)\theta _2 + \theta _1]|b|^2 - t_{13}\mathrm{Re}(a{\bar{b}}c),\\ |c|^2 \frac{d}{dt}{\arg (c)}= & {} \, -(h_2-h_3)[(\rho _2 +\rho _3)\theta _2 + \theta _1]|c|^2 - \theta _2(h_2-h_3)\mathrm{Re}(a{\bar{b}}c),\\ \frac{d}{dt}{|a|^2}= & {} \, -2(h_1-h_2)\theta _2\mathrm{Im}(a{\bar{b}}c),\\ \frac{d}{dt}{|b|^2}= & {} \, 2(h_1-h_3)\theta _2\mathrm{Im}(a{\bar{b}}c),\\ \frac{d}{dt}{|c|^2}= & {} \, -2(h_2-h_3)\theta _2\mathrm{Im}(a{\bar{b}}c), \end{aligned}$$

and real and imaginary parts of them,

$$\begin{aligned} \frac{d}{dt}{\mathrm{Re}(a{\bar{b}}c)}= & {} \, [\rho _1(h_3-h_2) +\rho _2(h_1-h_3) + \rho _3(h_2-h_1)]\theta _2\mathrm{Im}(a{\bar{b}}c)\\ \frac{d}{dt}{\mathrm{Im}(a{\bar{b}}c)}= & {} \, -[\rho _1(h_3-h_2) +\rho _2(h_1-h_3) + \rho _3(h_2-h_1)]\theta _2\mathrm{Re}(a{\bar{b}}c)\\&\quad -\theta _2(h_1-h_2)|b|^2|c|^2 + \theta _2(h_1-h_3)|a|^2|c|^2 - \theta _2(h_2-h_3)|a|^2|b|^2 \end{aligned}$$

We can find integrals of motion of (48), other than the diagonal elements of \(\rho\), using the fact that four of the equations have right-hand sides proportional to the same time-dependent function:

$$\begin{aligned} \dot{X}= & {} \, \frac{d}{dt}\left[ (h_1-h_3)|a|^2 + (h_1-h_2)|b|^2\right] = 0\\ \dot{Y}= & {} \, \frac{d}{dt}\left[ (h_2-h_3)|a|^2 - (h_1-h_2)|c|^2\right] = 0\\ \dot{Z}= & {} \, \frac{d}{dt}\left[ (h_1-h_3)|c|^2 + (h_2-h_3)|b|^2\right] = 0\\ \dot{Q}= & {} \,\frac{d}{dt}\left[ |a|^2 + |b|^2 + |c|^2\right] = 0\\ \dot{U}= & {} \, \frac{d}{dt}\left( [\rho _1(h_3-h_2) +\rho _2(h_1-h_3) + \rho _3(h_2-h_1)]|a|^2 + 2(h_1-h_2)\mathrm{Re}(a{\bar{b}}c)\right) = 0\\ \dot{V}= & {} \,\frac{d}{dt}\left( [\rho _1(h_3-h_2) +\rho _2(h_1-h_3) + \rho _3(h_2-h_1)]|b|^2 - 2(h_1-h_3)\mathrm{Re}(a{\bar{b}}c))\right) = 0\\ \dot{W}= & {} \,\frac{d}{dt}\left( [\rho _1(h_3-h_2) +\rho _2(h_1-h_3) + \rho _3(h_2-h_1)]|c|^2 + 2(h_2-h_3)\mathrm{Re}(a{\bar{b}}c))\right) = 0 \end{aligned}$$

They are not linearly independent, since

$$\begin{aligned} X-Y= & {} \, (h_1-h_2)Q,\\ X+Z= & {} \, (h_1-h_3)Q,\\ Y+Z= & {} \, (h_2-h_3)Q,\\ U+V+W= & {} \,[\rho _1(h_3-h_2) +\rho _2(h_1-h_3) + \rho _3(h_2-h_1)]Q. \end{aligned}$$

The next integrals of motion can be found from the characteristic polynomial,

$$\begin{aligned} \det (\rho - \lambda I)= & {} \, -\lambda ^3 +\lambda ^2(\rho _1 +\rho _2+\rho _3) \\&-\lambda (\rho _1\rho _2 +\rho _1\rho _3+\rho _2\rho _3 - |a|^2 - |b|^2 - |c|^2)\\&+ \rho _1\rho _2\rho _3 +2\mathrm{Re}(a{\bar{b}}c) -|a|^2\rho _3-|b|^2\rho _2-|c|^2\rho _1. \end{aligned}$$

From the time invariance of the spectrum of solutions of (48) we find the constant of motion

$$\begin{aligned} R= & {} \, |a|^2\rho _3+|b|^2\rho _2+|c|^2\rho _1 - 2\mathrm{Re}(a{\bar{b}}c)= \frac{1}{h_1-h_2}(\rho _2X+\rho _1Y-U)\\= & {} \,\frac{1}{h_1-h_3}(\rho _3X+\rho _1Z+V)=\frac{1}{h_2-h_3}(\rho _3Y+\rho _2Z-W). \end{aligned}$$

Now we are in position to verify which solution can be used in the dressing transformation. The first equation (18) of the Lax pair is an eigenvalue problem for the operator \(\frac{1}{\mu }\rho +H\). We expect that the operator has at least one eigenvalue which is constant in time. Again, we should examine the characteristic polynomial,

$$\begin{aligned}&\det \left( \frac{1}{\mu }\rho +H - \lambda I\right) \\&\quad = -\lambda ^3 +\lambda ^2\left( \frac{1}{\mu }(\rho _1 +\rho _2+\rho _3)+h_1+h_2+h_3\right) \\&\qquad -\lambda \left( \left( \frac{\rho _1}{\mu }-h_1\right) \left( \frac{\rho _2}{\mu }-h_2\right) +\left( \frac{\rho _1}{\mu }-h_1\right) \left( \frac{\rho _3}{\mu }-h_3\right) \right. \\&\left. \qquad +\left( \frac{\rho _2}{\mu }-h_2\right) \left( \frac{\rho _3}{\mu }-h_3\right) -\frac{1}{\mu ^2}\left( |a|^2 + |b|^2 + |c|^2\right) \right) \\&\qquad + \left( \frac{\rho _1}{\mu }-h_1\right) \left( \frac{\rho _2}{\mu }-h_2\right) \left( \frac{\rho _3}{\mu }-h_3\right) \rho _1 \\&\qquad +\frac{2}{\mu ^3}\mathrm{Re}(a{\bar{b}}c) -\frac{|a|^2}{\mu ^2}\left( \frac{\rho _3}{\mu }-h_3\right) -\frac{|b|^2}{\mu ^2}\left( \frac{\rho _2}{\mu }-h_2\right) -\frac{|c|^2}{\mu ^2}\left( \frac{\rho _1}{\mu }-h_1\right) \end{aligned}$$

The coefficients of the polynomial are constant as one can easily verify. The last one can be described in terms of invariants,

$$\begin{aligned}{} & {} \left( \frac{\rho _1}{\mu }-h_1\right) \left( \frac{\rho _2}{\mu }-h_2\right) \left( \frac{\rho _3}{\mu }-h_3\right) \rho _1 \\&\quad +\frac{2}{\mu ^3}\mathrm{Re}(a{\bar{b}}c) -\frac{|a|^2}{\mu ^2}\left( \frac{\rho _3}{\mu }-h_3\right) -\frac{|b|^2}{\mu ^2}\left( \frac{\rho _2}{\mu }-h_2\right) -\frac{|c|^2}{\mu ^2}\left( \frac{\rho _1}{\mu }-h_1\right) \\&\quad =\left( \frac{\rho _1}{\mu }-h_1\right) \left( \frac{\rho _2}{\mu }-h_2\right) \left( \frac{\rho _3}{\mu }-h_3\right) \rho _1 - \frac{1}{\mu ^3}R -S , \end{aligned}$$

where \(S=|a|^2h_3-|b|^2h_2-|c|^2h_1 = h_1Q-X=h_2Q-Y=h_3 Q+Z\). Therefore, any solution of (48) in dimension three has all the eigenvalues constant. This means that the evolution of eigenvectors is given by some \(V^{-1}(t)\), and thus \(\frac{1}{\mu }\rho (t) +H = V(t)[\frac{1}{\mu }\rho (0) +H]V^{-1}(t)\).

To construct an explicit dressing transformation we need to find a relatively simple solution for the seed \(\rho\). Assume that \(\rho ^2\) is affine in \(\rho\), with the constant term commuting with H,

$$\begin{aligned} \rho ^2 = A_1\rho + A_2(\rho H + H\rho ) + A_3 H + A_4 H^2 + A_5 I . \end{aligned}$$
(49)

Then

$$\begin{aligned}{}[H,\theta _2\rho ^2+\theta _1\rho + \theta _0 I] = [(\theta _1 + \theta _2 A_1)H + \theta _2 A_2 H^2, \rho ], \end{aligned}$$

so the equation for \(\rho\), with \(f(\rho )=\theta _2 \rho ^2 + \theta _1 \rho + \theta _0 I\), becomes linear

$$\begin{aligned} i{\dot{\rho }}= & {} \,[H,f(\rho )]=[(\theta _1 + \theta _2 A_1)H + \theta _2 A_2 H^2, \rho ]. \end{aligned}$$

Its solution reads

$$\begin{aligned} \rho (t)= & {} U(t)\rho (0)U^\dag (t) \end{aligned}$$

with

$$\begin{aligned} U(t) = \exp \left( -i\left[ \int _0^t(\theta _1 + \theta _2 A_1)d\tau H + \int _0^t\theta _2 A_2 d\tau H^2 \right] \right) =\exp \left( -i\int _0^tG d\tau \right) . \end{aligned}$$

(49) is equivalent to the system of six equations

$$\begin{aligned} \rho _1^2+ |a|^2 + |b|^2= & {} \, A_1 \rho _1 +2A_2 \rho _1 h_1 +A_3 h_1 +A_4 h_1^2 + A_5\nonumber ,\\ \rho _2^2+ |a|^2 + |c|^2= & {} \,A_1 \rho _2 +2A_2 \rho _2 h_2 +A_3 h_2 +A_4 h_2^2 + A_5\nonumber ,\\ \rho _3^2+ |c|^2 + |b|^2= & {} \,A_1 \rho _3 +2A_2 \rho _3 h_3 +A_3 h_3 +A_4 h_3^2 + A_5\nonumber ,\\ (\rho _1+\rho _2)a + b{\bar{c}}= & {} A_1 a + A_2 a(h_1+h_2), \end{aligned}$$
(50)
$$\begin{aligned} (\rho _1+\rho _3)b + ac= & {} \,A_1 b + A_2 b(h_1+h_3) , \end{aligned}$$
(51)
$$\begin{aligned} (\rho _2+\rho _3)c + {\bar{a}}b= & {} \,A_1 c + A_2 c(h_2+h_3). \end{aligned}$$
(52)

Let \(a=|a|e^{i\varsigma _a}\), \(b=|b|e^{i\varsigma _b}\) and \(c=|c|e^{i\varsigma _c}\), then from (50)– (52) follow \(b{\bar{c}}=Sa\), \(ac =Sb\) and \({\bar{a}}b=Sc\) for some S. It is possible only for \(|a|=|b|=|c|\) and \(\varsigma _b= \varsigma _a + \varsigma _c\). Eliminating a from (50) we find that \(\rho _j=p h_j+z\), for some parameters p and z, so

$$\begin{aligned} \rho= & {} \,\left( \begin{array}{ccc} z +p h_1&{}|a|e^{i\varsigma _a}&{}|a|e^{i(\varsigma _a + \varsigma _c)}\\ |a|e^{-i\varsigma _a} &{} z +p h_2&{}|a|e^{i\varsigma _c}\\ |a|e^{-i(\varsigma _a + \varsigma _c)}&{}|a|e^{-i\varsigma _c}&{} z +p h_3 \end{array} \right) , \end{aligned}$$
(53)

and

$$\begin{aligned} A_1= & {} \, 2z +|a|,\\ A_2= & {} \,p,\\ A_3= & {} \,-p(|a|+2z),\\ A_4= & {} \,-p^2,\\ A_5= & {} \,2|a|^2 -|a|z -z^2. \end{aligned}$$

Accordingly,

$$\begin{aligned} \rho ^2= & {} \,(2z +|a|)\rho + p(\rho H + H\rho ) -p(|a|+2z) H -p^2 H^2 + (2|a|^2 -|a|z -z^2)I,\\ G= & {} \,(\theta _1 + \theta _2 (2z +|a|))H + \theta _2 p H^2. \end{aligned}$$

We now use the fact that G commutes with H, to make the ZS spectral problem static (exactly like in the two dimensional case). We define \(|\phi \rangle = {U}^\dag |\varphi \rangle = e^{i\int _0^t G d\tau }|\varphi \rangle\), so that

$$\begin{aligned} z_{\mu }|\varphi \rangle= & {} \,\left( \frac{1}{\mu }\rho - H \right) |\varphi \rangle ,\\ i{|{{\dot{\varphi }}} \rangle }= & {} \, \frac{1}{\mu }f(\rho )|\varphi \rangle , \end{aligned}$$

implies (for \(\rho\) at \(t=0\)),

$$\begin{aligned} z_{\mu }|\phi \rangle= & {} \,\left( \frac{1}{\mu }{\rho }(0)- H\right) |\phi \rangle ,\\ i{|{{\dot{\phi }}}\rangle }= & {} \, \left( \frac{1}{\mu }f({\rho }(0)) - G \right) |\phi \rangle . \end{aligned}$$

Following the strategy from the two dimensional case we check that the generator of the dynamics of \(|\phi \rangle\) commutes with the operator of the first ZS problem:

$$\begin{aligned} \left[ \frac{\rho }{\mu }-H, \frac{f(\rho )}{\mu }-G\right] =0. \end{aligned}$$
(54)

The latter means that both operators are some functions of one another. Since any function of a \(3\times 3\) matrix is equivalent to a second-order polynomial, then

$$\begin{aligned} \frac{f(\rho )}{\mu }-G=B_1 \left( \frac{\rho }{\mu }-H\right) ^2 +B_2\left( \frac{\rho }{\mu }-H\right) +B_3 I. \end{aligned}$$

We can compare coefficients on both sides, arriving at

$$\begin{aligned} B_1= & {} \,\frac{\theta _2 p\mu }{p-\mu } ,\\ B_2= & {} \,\theta _1 + \theta _2 (2z +|a|)\frac{\mu }{\mu -p},\\ B_3= & {} \,\theta _2(2|a|^2 -|a|z -z^2)\frac{1}{\mu -p} + \frac{\theta _0}{\mu }. \end{aligned}$$

Finally,

$$\begin{aligned} \frac{f(\rho )}{\mu }-G= & {} \frac{\theta _2 p\mu }{p-\mu }\left( \frac{\rho }{\mu }-H\right) ^2 + \left( \theta _1 + \theta _2 (2z +|a|)\left( 1+ \frac{p}{\mu -p}\right) \right) \left( \frac{\rho }{\mu }-H\right) \\&+\left( \theta _2(2|a|^2 -|a|z -z^2)\frac{1}{\mu }\left( 1+ \frac{p}{\mu -p}\right) + \frac{\theta _0}{\mu }\right) I \end{aligned}$$

A very simple evolution of \(|\phi \rangle\) is the next consequence of this relation,

$$\begin{aligned} i{|{{\dot{\phi }}}\rangle }= & {} \left( \frac{1}{\mu }f({\rho }(0)) - G \right) |\phi \rangle \\= & {} \, \left[ \frac{\theta _2 p\mu }{p-\mu }\left( \frac{\rho }{\mu }-H\right) ^2 +\left( \theta _1 + \theta _2 (2z +|a|)\left( 1+ \frac{p}{\mu -p}\right) \right) \left( \frac{\rho }{\mu }-H\right) \right. \\&\,\left. \quad +\left( \theta _2(2|a|^2 -|a|z -z^2)\frac{1}{\mu }\left( 1+ \frac{p}{\mu -p}\right) + \frac{\theta _0}{\mu }\right) I\right] |\phi \rangle \\= & {} \,\left[ \frac{\theta _2 p\mu }{p-\mu }z^2_{\mu }+\left( \theta _1 + \theta _2 (2z +|a|)\right) \left( 1+ \frac{p}{\mu -p}\right) z_{\mu } \right. \\&\left. \quad +\left( \theta _2(2|a|^2 -|a|z -z^2)\frac{1}{\mu }\left( 1+ \frac{p}{\mu -p}\right) + \frac{\theta _0}{\mu }\right) \right] |\phi \rangle \end{aligned}$$

Exactly like in the two-dimensional case this vector changes only by a time-depended factor. To calculate it we first have to find an eigenvalue of \(\frac{\rho }{\mu }-H\):

$$\begin{aligned} \det (\rho -\mu H -\lambda I)= & {} \, \left| \begin{array}{ccc} z +(p-\mu ) h_1-\lambda &{}|a|e^{i\varsigma _a}&{}|a|e^{i(\varsigma _a + \varsigma _c)}\\ |a|e^{-i\varsigma _a} &{} z +(p-\mu ) h_2-\lambda &{}|a|e^{i\varsigma _c}\\ |a|e^{-i(\varsigma _a + \varsigma _c)}&{}|a|e^{-i\varsigma _c}&{} z +(p-\mu ) h_3-\lambda \end{array} \right| \\= & {} \,\left| \begin{array}{ccc} -\lambda '&{}|a|e^{i\varsigma _a}&{}|a|e^{i(\varsigma _a + \varsigma _c)}\\ |a|e^{-i\varsigma _a} &{} sg_1-\lambda '&{}|a|e^{i\varsigma _c}\\ |a|e^{-i(\varsigma _a + \varsigma _c)}&{}|a|e^{-i\varsigma _c}&{} sg_2-\lambda ' \end{array} \right| \\= & {} \,-\lambda '^3+\lambda '^2 s(g_1+g_2)+\lambda '(3|a|^2-s^2 g_1g_2)+2|a|^3-|a|^2s(g_1+g_2), \end{aligned}$$

where \(\lambda '=\lambda -z-(p-\mu ) h_1\) and \(g_i= h_{i+1}-h_1\). There are three eigenvalues, but let us choose the parameters in a way guaranteeing that one of the eigenvalues equals |a|. This implies that \(p=\alpha\), \(|a|=\frac{|\beta |\sqrt{-g_1g_2}}{2}\). In this case \(\mu z_{\mu } = \frac{|\beta |\sqrt{-g_1g_2}}{2}+z -i\beta h_1\), and

$$\begin{aligned} i{|{{\dot{\phi }}}\rangle }= & {} \,\left( \theta _2 \left( \mu z^2_{\mu }+ h_1|a| -i\beta h_1^2 - \frac{2i|a|^2}{\beta } \right) + \frac{\theta _1}{\mu }\left( |a|+z -i\beta h_1\right) + \frac{\theta _0}{\mu }\right) |\phi \rangle . \end{aligned}$$

The corresponding eigenvector reads

$$\begin{aligned} |\phi (0)\rangle= & {} \,\frac{1}{\sqrt{2 |h_3-h_2|}} \left( \begin{array}{c} (i\mathrm{sgn}(\beta )\sqrt{|h_3-h_1|}+ \sqrt{|h_2-h_1|})e^{i(\varsigma _a + \varsigma _c)}\\ i\mathrm{sgn}(\beta ) \sqrt{|h_3-h_1|}e^{i\varsigma _c}\\ \sqrt{|h_2-h_1|} \end{array} \right) \\\equiv & {} \,\left( \begin{array}{c} \phi _1^{(k)} (0) \\ \phi _2^{(k)} (0) \\ \phi _3^{(k)} (0) \\ \end{array}\right) = |\phi (0)^{(k)}\rangle \end{aligned}$$

The index k reminds us that, from the point of view of applications, we consider a solution associated with a kth block; the only parameter that is block-independent is here \(\beta\) (the imaginary part of \(\mu\)). In order to get the explicit evolution of \(|\varphi \rangle\) we first calculate the time-dependent factor,

$$\begin{aligned} u(t) +i v(t)= & {} \int _0^t\theta _2(\tau )d\tau \left[ \frac{2\alpha x y +\beta (y^2 -x^2)}{\alpha ^2+\beta ^2} -\beta h_1^2 - \frac{2|a|^2}{\beta } \right] \\&+i\int _0^t\theta _2(\tau )d\tau \left[ \frac{\alpha (y^2 -x^2) -2\beta x y}{\alpha ^2+\beta ^2}- h_1|a| \right] \\&+\beta \frac{\int _0^t\theta _1(\tau )d\tau [\left( \frac{|\beta |\sqrt{-g_1g_2}}{2}+ z\right) -\alpha h_1] + \int _0^t\theta _0(\tau )d\tau }{\alpha ^2+\beta ^2} \\&-i\frac{\int _0^t\theta _1(\tau )d\tau [\alpha \left( \frac{|\beta |\sqrt{-g_1g_2}}{2}+ z\right) +\beta ^2 h_1] + \int _0^t\theta _0(\tau )d\tau \alpha }{\alpha ^2+\beta ^2} \end{aligned}$$

and thus

$$\begin{aligned} |\phi (t)\rangle =\frac{e^{u(t) +i v(t)}}{\sqrt{2\beta ^2 g_2(g_2-g_1)}} \left( \begin{array}{c} (i\beta g_2+ |\beta |\sqrt{-g_1g_2})e^{i(\varsigma _a + \varsigma _c)}\\ i\beta g_2e^{i\varsigma _c}\\ |\beta |\sqrt{-g_1g_2} \end{array} \right) =|\phi (t)^{(k)}\rangle . \end{aligned}$$

Finally, we use the form of the operator \(G=\left( \theta _1 + \theta _2 (2z +\frac{|\beta |\sqrt{-g_1g_2}}{2})\right) H + \theta _2 \alpha H^2\) to get the explicit solution of the ZS Lax pair,

$$\begin{aligned} |\varphi (t)\rangle= & {} \,e^{-i\int _0^t G(\tau ) d\tau }e^{u(t) +i v(t)}|\phi (0)\rangle \\= & {} \,e^{-i\left[ \left( \int _0^t \theta _1(\tau ) d\tau + \int _0^t\theta _2(\tau ) d\tau (2z +\frac{|\beta |\sqrt{-g_1g_2}}{2})\right) H + \alpha \int _0^t\theta _2(\tau ) d\tau H^2 \right] }|\phi (t)\rangle \\= & {} \,|\varphi (t)^{(k)}\rangle . \end{aligned}$$

To sum up this stage, we have found both a seed \(\rho\), which satisfies the von Neumann equation, and the vector \(|\varphi (t)\rangle\) which solves the Lax pair. To make sure that \(\rho [1]\) will be a density matrix we have to impose additional restrictions on parameters of the seed solution. By Sylvester’s positivity criterion,

$$\begin{aligned}&z +\alpha h_1>0,\\&(z +\alpha h_1)(z +\alpha h_2)>|a|^2,\\&(z +\alpha h_1)(z +\alpha h_2)(z +\alpha h_3)+2|a|^3 -|a|^2(3z+\alpha (h_1+h_2+h_3))>0. \end{aligned}$$

For \(z +\alpha h_i>|a|=\frac{|\beta |\sqrt{-g_1g_2}}{2}\) the three inequalities are satisfied.

Now consider the case

$$\begin{aligned} H=\text {diag}(h_1,\dots ,h_7)=\text {diag}\left( h_1^{(1)},h_2^{(1)},h_3^{(1)},h_1^{(2)},h_2^{(2)},h_1^{(3)},h_2^{(3)}\right) , \end{aligned}$$
(55)

and

$$\begin{aligned} z=\frac{1}{7}\left[ \alpha \left( 1 - \sum _{i=1}^7 h_i\right) - 2 \beta \sqrt{(h_1 - h_2) (h_3 - h_1)} \right] . \end{aligned}$$
(56)

The dressed solution has the block form

$$\begin{aligned} \rho [1] = \left( \begin{array}{ccc} \rho [1]^{(11)} &{} \rho [1]^{(12)} &{} \rho [1]^{(13)} \\ \rho [1]^{(21)} &{} \rho [1]^{(22)} &{} \rho [1]^{(23)} \\ \rho [1]^{(31)} &{}\rho [1]^{(32)} &{} \rho [1]^{(33)} \end{array}\right) = \left( \begin{array}{ccc} 3\times 3 &{} 3\times 2 &{} 3\times 2 \\ 2\times 3 &{} 2\times 2 &{} 2\times 2 \\ 2\times 3 &{}2\times 2 &{} 2\times 2 \end{array}\right) , \end{aligned}$$

where at the right-hand-side the dimensions of the blocks have been indicated. The 2-dimensional blocks are constructed by means of (38)–(41), with \(w^{(2)}=w^{(3)}=0\), and

$$\begin{aligned} c_{kl}(t) = \frac{ {\vartheta }^{(k)} \overline{{\vartheta }^{(l)}} e^{[u^{(k)}(t) + u^{(l)}(t)] + i [v^{(k)}(t) - v^{(l)}(t)]} }{\sum _{i=1}^3 |{\vartheta }^{(i)}|^2 e^{2u^{(i)}(t)}}. \end{aligned}$$
(57)

Note the sum from 1 to 3 in the denominator of \(c_{kl}\). The 3-dimensional block on the diagonal reads

$$\begin{aligned} \rho [1]^{(11)} =\left( \begin{array}{ccc} \alpha h_1^{(1)} +z &{} s_{12}^{(1)}e^{i\varsigma ^{(1)}_a }e^{-i\omega _{12}^{(11)}}&{} s_{13}^{(1)}e^{i(\varsigma ^{(1)}_a+ \varsigma ^{(1)}_c)}e^{-i\omega _{13}^{(11)}} \\ s_{21}^{(1)}e^{-i\varsigma ^{(1)}_a }e^{-i\omega _{21}^{(11)}}&{} \alpha h_2^{(1)} +z&{} s_{23}^{(1)}e^{i\varsigma ^{(1)}_c }e^{-i\omega _{23}^{(11)}} \\ s_{31}^{(1)}e^{-i(\varsigma ^{(1)}_a+ \varsigma ^{(1)}_c)}e^{-i\omega _{31}^{(11)}} &{} s_{32}^{(1)}e^{-i\varsigma ^{(1)}_c }e^{-i\omega _{32}^{(11)}} &{} \alpha h_3^{(1)} +z\\ \end{array}\right) . \end{aligned}$$
(58)

The following functions have been introduced in (58):

$$\begin{aligned} s_{12}^{(1)}= & {} \,|\beta |\sqrt{| h_2^{(1)} - h_1^{(1)}|| h_3^{(1)} - h_1^{(1)}|}\left( \frac{1}{2}+\frac{ c_{11}( h_2^{(1)} - h_1^{(1)}) }{| h_3^{(1)} - h_2^{(1)}|}\right) \\&\,+i\beta c_{11}( h_2^{(1)} - h_1^{(1)})\frac{| h_3^{(1)} - h_1^{(1)}|}{| h_3^{(1)} - h_2^{(1)}|} = \overline{s_{21}^{(1)}}\\ s_{13}^{(1)}= & {} \,|\beta |\sqrt{| h_2^{(1)} - h_1^{(1)}|| h_3^{(1)} - h_1^{(1)}|}\left( \frac{1}{2}-\frac{ c_{11}( h_3^{(1)} - h_1^{(1)}) }{| h_3^{(1)} - h_2^{(1)}|}\right) \\&\,+i\beta c_{11}( h_3^{(1)} - h_1^{(1)})\frac{| h_2^{(1)} - h_1^{(1)}|}{| h_3^{(1)} - h_2^{(1)}|}= \overline{s_{31}^{(1)}}\\ s_{23}^{(1)}= & {} \,|\beta |\sqrt{| h_2^{(1)} - h_1^{(1)}|| h_3^{(1)} - h_1^{(1)}|}\left( \frac{1}{2}-\frac{ c_{11}( h_3^{(1)} - h_2^{(1)}) }{| h_3^{(1)} - h_2^{(1)}|}\right) = \overline{s_{32}^{(1)}} \end{aligned}$$

and

$$\begin{aligned} \omega _{ij}^{(11)}= & {} \,\left( \int _0^t \theta _1(\tau ) d\tau + \int _0^t\theta _2(\tau ) d\tau (2z +\frac{|\beta |}{2}\sqrt{| h_2^{(1)} - h_1^{(1)}|| h_3^{(1)} - h_1^{(1)}|})\right) (h^{(1)}_i-h^{(1)}_j)\\&+p \int _0^t\theta _2(\tau ) d\tau [(h^{(1)}_i)^2 -(h^{(1)}_j)^2]. \end{aligned}$$

The two \(3\times 2\) blocks read

$$\begin{aligned} \rho [1])^{(kl)} = \frac{ 2i \beta c_{kl}}{\sqrt{2|\beta || h_3^{(k)} - h_2^{(k)}|| h_1^{(l)} - h_2^{(l)}|}}\left( \begin{array}{cc} r^{(kl)}_{11}e^{i(\varsigma ^{(k)}_a + \varsigma ^{(k)}_c - \gamma ^{(l)})} &{} r^{(kl)}_{12} e^{i(\varsigma ^{(k)}_a + \varsigma ^{(k)}_c )} \\ r^{(kl)}_{21}e^{i( \varsigma ^{(k)}_c - \gamma ^{(l)})} &{} r^{(kl)}_{22} e^{i \varsigma ^{(k)}_c } \\ r^{(kl)}_{31}e^{-i\gamma ^{(l)} } &{} r^{(kl)}_{32} \\ \end{array}\right) , \end{aligned}$$

where

$$\begin{aligned} r^{(kl)}_{ij}= & {} \, {\hat{\phi }}_i^{(k)} \sqrt{|\beta h_{\sigma (j)}^{(l)} +y|}( h_j^{(l)} - h_i^{(k)})e^{-i\omega _{ij}^{(kl)}},\\ {\hat{\phi }}_1^{(k)}= & {} \, \left( i\mathrm{sgn}(\beta )\sqrt{|h_3-h_1|}+ \sqrt{|h_2-h_1|}\right) e^{i(\varsigma _a + \varsigma _c)},\\ {\hat{\phi }}_2^{(k)}= & {} \, i\mathrm{sgn}(\beta ) \sqrt{|h_3-h_1|}e^{i\varsigma _c},\\ {\hat{\phi }}_3^{(k)}= & {} \,\sqrt{|h_2-h_1|}, \end{aligned}$$

(\(\sigma (i)\) is an odd permutation of \(i\in \{ 1,2\}\)), and

$$\begin{aligned} \omega _{ij}^{(kl)}= & {} \,\left( \int _0^t \theta _1^{(k)}(\tau ) d\tau + \int _0^t\theta _2^{(k)}(\tau ) d\tau \left( 2z +\frac{|\beta |}{2}\sqrt{| h_2^{(k)} - h_1^{(k)}|| h_3^{(k)} - h_1^{(k)}|}\right) \right) h^{(k)}_i \\&+\alpha \int _0^t\theta _2^{(k)}(\tau ) d\tau (h^{(k)}_i)^2 - \int _0^t \theta _1^{(l)}(\tau )h^{(l)}_j d\tau . \end{aligned}$$

The remaining two \(2\times 3\) blocks are the Hermitian conjugates of the \(3\times 2\) ones, so that \(\rho [1]\) is Hermitian.

Figure 6 shows the dynamics of all the 42 time-dependent populations associated with a \(7\times 7\) solution \(\rho [1]\). The diagonal elements are time-independent, so we do not plot them.

Fig. 6
figure 6

42 populations for \(f(\rho ) = \sinh (\omega t) \rho ^2\), \(h_1=0.0051\), \(h_2=0.005\), \(h_3=0.0052\), \(h_4=0.0053\), \(h_5=0.0049\), \(h_6=0.0054\), \(h_7=0.0048\), \(\vartheta ^{(1)}=1+i\), \(\vartheta ^{(2)}=2+i\), \(\vartheta ^{(3)}=3+i\), \(\alpha =10\), \(\beta =10\), \(\omega =10\), \(\gamma _1=2\), \(\gamma _2=3\), \(\gamma _3=4\), \(\gamma _4=5\)

4 Further Perspectives

We have developed a method of generating appropriate seed solutions for the soliton system \(i{{\dot{\rho }}}(t)=[H,f_t(\rho (t))]\). H is Hermitian and its spectrum possesses a discrete part, an assumption valid for a large class of H. Differences of eigenvalues of H, \(k_{jk}=h_j-h_k\), enter the rate equations as kinetic constants. So, given \(k_{jk}\), one can design the dynamics by adjusting H. The nonlinearity \(f_t\) is essentially arbitrary as well, although in practical computations one replaces \(f_t\) by a polynomial with time dependent coefficients. From the point of view of realistic modeling the formalism is much more flexible than anything discussed in the literature so far.

Still, is it flexible enough? Probably not. Our equation is just a tip of the iceberg. Almost unexplored is the general family of soliton von Neumann equations \(i{{\dot{\rho }}}(t)=[H_t(\rho (t)),\rho (t)]\) discussed in (Cieśliński et al. 2003). Here \(H(\rho )\) is a ‘non-Abelian’ function, a kind of polynomial whose coefficients are not numbers but operators. The relevant dressing transformations have been constructed (Cieśliński et al. 2003), but virtually nothing is known about the structure of seed solutions.

For time independent f the system described by the von Neumann equation is conservative. A time dependent \(f_t\) makes the system open: dissipative or driven. Dissipation can be introduced also through a time-independent part, such as the simple example discussed in (Aerts et al. 2013),

$$\begin{aligned} {{\dot{\rho }}}(t)=-i\left[ H,f\left( \rho (t)\right) \right] +\xi \rho , \end{aligned}$$
(59)

where \(\xi \in {\mathbb {R}}\) is a birth or mortality rate. More generally, one can consider

$$\begin{aligned} {{\dot{\rho }}}(t)=-i\left[ H\left( \rho (t)\right) ,\rho (t)\right] +\varXi (\rho ), \end{aligned}$$
(60)

where \(\varXi (\rho )=\varXi (\rho )^\dag\) is a Hermitian, \(\rho\)-dependent operator, but little is known about soliton integrability of equations involving a less trivial \(\varXi (\rho )\).

Yet another possibility of introducing dissipation without explicitly time-dependent parameters is to consider solutions analytically continued either in t (a ‘complex time’), or in other parameters of the system. A complex time is known to turn the Schroedinger equation into a diffusion equation, so a similar trick can be performed in the von Neumann case (Aerts and Czachor 2007). But since Hermiticity of \(\rho\) will be in general lost, a new model of probability has to be employed.