Determining the ability for universal quantum computing: Testing controllability via dimensional expressivity

Operator controllability refers to the ability to implement an arbitrary unitary in SU(N) and is a prerequisite for universal quantum computing. Controllability tests can be used in the design of quantum devices to reduce the number of external controls. Their practical use is hampered, however, by the exponential scaling of their numerical effort with the number of qubits. Here, we devise a hybrid quantum-classical algorithm based on a parametrized quantum circuit. We show that controllability is linked to the number of independent parameters, which can be obtained by dimensional expressivity analysis. We exemplify the application of the algorithm to qubit arrays with nearest-neighbour couplings and local controls. Our work provides a systematic approach to the resource-efficient design of quantum chips.


Introduction
Universal quantum computing [1] requires controllability on the quantum processing unit, so that every quantum logic gate can be implemented.A common layout in hardware platforms such as those based on superconducting circuits achieves this by combining two-qubit couplings with local drives for each qubit of the array [2,3].While effective, this approach becomes demanding for larger arrays, due to both the physical space needed for each control as well as the asso-ciated calibration.Controllability tests can help identify less resource-intensive architectures that are still capable of performing the same quantum gates [4].
Controllability in general studies the dynamics that can be implemented in a quantum system driven by a set of controls [5,6,7].In particular, a system is pure-state controllable if it can reach all final states.Alternatively, an (evolution) operator controllable system is capable of implementing every unitary gate, a necessary feature for universal quantum computing.Tests for these two different types of controllability rely on computing the rank of the dynamical Lie algebra of the Hamiltonian [5] or utilize methods based graph theory [8,9,10,4].For small system sizes, the tests can be carried out analytically [11,12,13,14].For some high-and infinitedimensional systems, controllability can be determined using induction arguments [15,16,9,17].Beyond these special cases, a numerical approach is possible in principle [4], but is limited by the exponential scaling of the Hilbert space dimension with respect to the number of qubits.In other words, the accuracy and feasibility of controllability tests for increasing system size suffer from the curse of dimensionality.
Here, we present a hybrid quantum-classical controllability test, for both pure-state and operator controllability of qubit arrays.The hybrid method we propose evaluates the controllability of the qubit array by measurements on a quantum device, either the system to be studied with an extra auxiliary qubit or one that mimics the dynamics of the original system.This opens up a new way of designing controllable qubit arrays with fewer resources, helping to address the issue of scalability.To do so, we harness the computational power of quantum circuits to extract information directly from the qubit array under study.While our controllability test relies on the same mathematical foundations as the Lie rank condition, its design circumvents issues that arise in the construction of the dynamical Lie algebra, in particular the orthonormalization calculations it entails.Mapping the classical operations of our hybrid quantum-classical algorithm to a quantum device would further expand the size of the qubit arrays whose controllability we can determine.
Parametric quantum circuits constitute the basis of many algorithms, for example variational algorithms for solving computationally hard optimization problems [18,19].The circuits consist of a set of parametric gates that can be used to measure a cost function.After a classical optimization, the parameters are updated to give a new cost value, continuing the feedback loop of the algorithm.It is necessary to include enough independent optimization parameters to reach the best possible solution.However, minimizing the number of parametric gates and circuit depth is also key in the era of noisy quantum devices [20].In order to reduce the noise of the circuit while maintaining its optimization capability, every redundant parameter should be identified and removed from the circuit.This goal is related to the dimensional expressivity of the circuit and can be achieved with dimensional expressivity analysis [21,22], a hybrid quantum-classical algorithm to systematically find redundant parameters.
In order to leverage dimensional expressivity analysis to test for controllability, we define a parametric quantum circuit based on the architecture of a given qubit array with local controls and qubit couplings.We then use dimensional expressivity analysis to quantify the number of independent parameters which is related to the controllability of the original qubit array.We provide a complete description of how to carry out the hybrid controllability test on a quantum circuit, opening the possibility of obtaining information of the controllability of a quantum device before it is built.
The manuscript is organized as follows.The basic concepts of controllability analysis and parametric quantum circuits are briefly reviewed in section 2. The pure-state controllability test is presented in section 3, including its derivation, definition and showcase examples.Section 4 extends the test to operator controllability, making use of the Choi-Jamiołkowski isomorphism.Section 5 concludes.

Theoretical background
To define controllability tests for qubit arrays, we combine the notions of system controllability and circuit expressivity.For the sake of a selfcontained presentation, we briefly recap the basic concepts in this section.

Controllability
We consider quantum systems linearly coupled to external controls.They are described by traceless Hamiltonians of the form where u j (t) are the controls and Ĥj are the control operators.The Hamiltonian (1) generates the time evolution operator Û (t) such that for any state |ψ(0)⟩ in the Hilbert space H, |ψ(t)⟩ = Û (t) |ψ(0)⟩ .Given an initial state |ψ 0 ⟩, the set of all final states |ψ(T )⟩ that can be reached in finite time 0 < T < ∞ with controls u j (t) is called the reachable set R |ψ 0 ⟩ of the system.The system is said to be pure-state controllable if R |ψ 0 ⟩ = S H (with S H the unit sphere on H), i.e., if every normalized state is reachable from any initial state |ψ 0 ⟩ [5].For physical systems this condition is not dependent on the initial state, which means that pure-state controllability is also independent of the state in which the system is initialized.Indeed, the evolution operators Û that can be implemented on such systems form a group.This implies that for every evolution Û in the group, Û −1 must also be contained in the group of feasible evolutions.If we assume that every state |ϕ⟩ ∈ H can be reached from a certain initial state |ψ 0 ⟩, then for every state |ϕ⟩ there exists an evolution Û|ψ 0 ⟩,|ϕ⟩ such that |ϕ⟩ = Û|ψ 0 ⟩,|ϕ⟩ |ψ 0 ⟩.Therefore given any initial state |ϕ i ⟩ and final state |ϕ f ⟩ we can always generate an evolution In particular this proves that if all states are reachable from a certain initial state in a closed system, every state is reachable from any other state.
Pure-state controllability is the relevant type of controllability when we are interested in are state transfers, i.e., evolving the system from an initial state to a certain target state.It is equivalent to proving that all state transfers are possible in a system.This, however, is not the strongest type of controllability that can be defined.Purestate controllability is sufficient to guarantee that there will always be evolution operators Û|ψ 0 ⟩,|ψ f ⟩ to connect any two states |ψ 0 ⟩ and |ψ f ⟩, yet not enough to ensure that it is possible to generate every operation Û in the special unitary group SU (d), where d = dim(H).Pure-state controllability does not guarantee that simultaneous stateto-state transfers are always possible.To study this property we consider the so-called operator controllability.A system with controls as defined in (1) and Hilbert space dimension d is operator controllable if for every unitary evolution Ûtarget ∈ SU (d) there exist a final time T ≥ 0, a phase angle φ ∈ [0, 2π) and a set of controls {u j } m j=1 such that Ûtarget = e iφ Û (T ; u 1 , ...u m ).Note that for both types of controllability there are no restrictions on the final time T ≤ ∞ at which state transfers, respectively unitary operations, are implemented.Consequently, this time T , while always finite, can be arbitrarily large.The question of controllability only inquires whether it is possible at all to perform the desired dynamics.Similarly, it does not impose any restrictions on the maximum amplitude that the controls u j (t) from (1) can take.Finite amplitude is a physical restriction that impacts the final time required to perform the different operations, but does not mathematically change the controllability of the system.
If the Hamiltonian of the system is known, there exist algebraic and numerical tests tailored for both types of controllability [23,24,25,5,4].

Dimensional expressivity
Parametric quantum circuits have multiple applications, as they constitute the base for variational quantum algorithms [26].Their design and study are pivotal factors in the efficiency of the algorithms.In particular, parameter dependence and the set of final states that can be pro-duced are two key topics that determine the capability of the algorithms.Lacking some necessary parametric gates leads to unsuccessful algorithms, whereas including too many dependent parameters is detrimental for the purpose of optimization.We introduce here notions and definitions related to these issues that are relevant for the controllability tests.
A parametric quantum circuit is a protocol implemented on a set of qubits that are initialized in a state |ψ 0 ⟩.It consists of a sequence of logic gates Ĝj , some of which depend on real parameters ϑ k .We consider a parametric quantum circuit as the map C( ⃗ ϑ) that identifies an array of parameters ⃗ ϑ in the parameter space P ∋ ⃗ ϑ with C( ⃗ ϑ) implicitly depends on the circuit's initial state |ψ 0 ⟩1 .An example of a parametric quantum circuit is found in Figure 1.Note that the amount of parameters on which each gate Ĝj ( ⃗ ϑ) depends may vary from zero to the total number of parameters, e.g.
) with the phase gate P and the Hadamard gate Ĥ.For the sake of simplicity, we have chosen units such that ℏ = 1.
The expressivity of a parametric quantum circuit is its ability to produce states that are representative of the full Hilbert space of the system [27,28].Here, we focus on the dimensional expressivity expr dim , i.e. the dimension of C (P) as a real differentiable manifold [21].As such, the maximal dimensional expressivity for a circuit with complex Hilbert space dimension d is max(expr dim ) = 2d − 1, which accounts for the real variables of the complex d-dimensional Hilbert space minus the normalization constraint.
Another important point is the concept of redundant parameters.In a quantum circuit C( ⃗ ϑ), a parameter ϑ j is considered redundant if small perturbations on ϑ j produce final states on C( ⃗ ϑ) that can also be achieved by keeping ϑ j constant and varying the rest of the parameters ϑ k as needed [22].Minimizing the number of redundant parameters is therefore a relevant matter in the design of parametric quantum circuits.Fewer redundant parameters may result in more resourceefficient circuits that can produce the same manifold of states.If a parameter ϑ 1 is redundant with another parameter ϑ 2 , then the converse is also true.We are free to choose one of the two parameters to remain constant while varying the other one at will.The latter is then called independent.Mathematically, the dimensional expressivity of a circuit C( ⃗ ϑ) is also equal to the number of elements in the maximal set of independent parameters in the circuit.While the cardinality of the maximal set for a certain circuit C( ⃗ ϑ) is fixed, there may exist multiple maximal sets.Locating and eliminating redundant parameters results in a minimal circuit with the same local dimension in the manifold of reachable states.
Redundant parameters and dimensional expressivity are studied through the real Jacobian J C of C( ⃗ ϑ).Assuming a total of N parameters, it takes the form where the elements ∂ k C represent the partial derivatives of C with respect to ϑ k .Re∂ k C and Im∂ k C denote the real and the imaginary part of ∂ k C, respectively.By definition, the dimensional expressivity is equal to the rank of J C ( ⃗ ϑ).In terms of J C , a parameter ϑ j is redundant with respect to the other parameters {ϑ i } i̸ =j at a point ⃗ ϑ if the j-th column of J C ( ⃗ ϑ) is linearly dependent with respect to the set of all the other columns of J C ( ⃗ ϑ), i.e. if the rank of J C ( ⃗ ϑ) as a matrix remains the same after removing the j-th column.
A systematic approach, for an ordered array of parameters ⃗ ϑ, relies on the partial real Jacobians containing only the first n columns of J C ( ⃗ ϑ).If ∂ 1 C( ⃗ ϑ) ̸ = 0 then ϑ 1 is independent and we initialize the set of independent parameters as N 1 := {ϑ 1 }; otherwise, N 1 := ∅.Then we can iterate over the following step.If rank(J C,k+1 ( ⃗ ϑ)) > rank(J C,k ( ⃗ ϑ)), then ϑ k+1 is independent and we update the set of independent parameters N k+1 = N k ∪ {ϑ k }.Else, ϑ k+1 is redundant and N k+1 = N k .After all N parameters have been checked, the set N N is a maximal set of independent parameters and its cardinality is the dimensional expressivity of the circuit.The redundant parameters can be then removed from the circuit by setting them to a suitably chosen constant value.
The dimensional expressivity analysis follows this approach and provides an efficient method to find a maximal set of independent parameters on a quantum circuit [21,22].As a hybrid quantumclassical algorithm, it mixes measurements on the actual circuit and classical computations for the ranks.Instead of calculating the ranks of J C,n , this method retrieves the entries of the matrices which are n × n matrices whose rank equals the one of J C,n ( ⃗ ϑ).The elements of S C,n ( ⃗ ϑ) can be determined via measurements on the circuit with the inclusion of a single auxiliary qubit, no matter the number of qubits in the original circuit [21].
3 Pure-state controllability test using dimensional expressivity This section introduces the novel connection between the dimensional expressivity of quantum circuits and the pure-state controllability of quantum systems.We present the design of a circuit associated to a controlled system that allows us to check its pure-state controllability.We include two examples to showcase its functionality.

Circuit expressivity and pure-state controllability
We consider a qubit array with Hamiltonian (1).We identify the drift Ĥ0 as the time-independent part, which includes the local free-qubit Hamiltonians and some time-independent couplings between them.Similarly, the operators Ĥj with 1 ≤ j ≤ m are coupled to the m different external controls acting on the system.In order to use dimensional expressivity analysis to determine controllability of a qubit array, it is necessary to define a parametric quantum circuit that can be run on the system, according to the different controls at disposal.If we can show that all normalized states in the Hilbert space are reachable from a certain initial state using only gates generated by the system's controls, we have proven pure-state controllability.
A straightforward choice for the possible parametric gates in the circuit is i.e. rotations around either the drift Ĥ0 or the control operators Ĥj (1).The gates R0 (α) can be implemented by letting the system evolve under its time-independent drift Hamiltonian Ĥ0 for a certain time t = α 2 .For the other gates, Rj (α) with j ≥ 1, we make use of the local controls.In these gates the Ĥ0 contribution can be neglected by assuming that the controls can be chosen such that ∥u j (t) Ĥj ∥ ≫ ∥ Ĥ0 ∥.A realistic approach to the Rj (α) implementation is to consider short rotations with intense controls u j (t), so that the Ĥ0 contribution is insignificant in comparison.The amplitude of u j (t) is usually adjusted externally and it has no imposed restriction.
We want to design a parametric quantum circuit C P SC ( ⃗ ϑ), starting with an arbitrary initial state |ψ 0 ⟩ ∈ H and exclusively composed of the rotation gates Rj (ϑ k ).We then use dimensional expressivity analysis to measure the dimensional expressivity of the system.If it is maximal, i.e. expr dim = 2d−1 for dim(H) = d, we have a manifold of reachable states with local real dimension 2d − 1.This manifold is a subset of H.We now prove that it is in fact the whole unit sphere of H.If we assume that the gates Rj (α) are cyclic and that every parameter ϑ k is used in a single rotation gate in the circuit, we can treat each ϑ k as if it had periodic boundaries, i.e. ϑ k ∈ S 1 .For an array of n parameters ⃗ ϑ the parameter space verifies This implies that P is a connected, compact set without boundary.Assume a circuit C P SC ( ⃗ ϑ) that has maximal dimensional expressivity.Then, the manifold of reachable states C P SC (P) ⊆ H is a connected, compact manifold without boundary and with maximal local real dimension.Consequently C P SC (P) = S H ⊂ H. Thus, the system is pure-state controllable.
So far, we have found a sufficient condition for pure-state controllability.We now want to identify a condition for non-controllable systems.To this end, we need to prove that there are some states that are not reachable by any of the possible dynamics that we can implement with the different operators Ĥj and their nested commutators.Hypothetically, we could do a sequence of the rotation gates (8) around the drift, the control operators and their nested commutators and test if all of them are linearly independent.However, generating the exponential of the commutator of two control operators (or one control operator and the drift) exp i β[ Ĥj , Ĥk ] is no trivial task.It may require optimal control to generate a specific rotation for the exact angle β and the chosen commutator [ Ĥj , Ĥk ].Instead, we access the different commutators by concatenating a series of multiplications, as in the Baker-Campbell-Hausdorff formula: Assume that we have a parametric quantum cir-cuit consisting of a sequence of n rotations, We can use Eq.(10) multiple times on the exponential sequence on the right-hand side of Eq. (11) to express it as a single exponential dependent on ⃗ ϑ, the different operators A j and their nested commutators.Assume as well that the dimensional expressivity in the circuit expr dim (C n seq ( ⃗ ϑ)) = d n is less than the maximum possible.We define a new parametric circuit by adding one more rotation to the chain of operations, If the dimensional expressivity of C n+1 seq and C n seq are the same for every ϑ n+1 ∈ R and every Ân+1 ∈ { Ĥk } m k=0 , then the number of linearly independent ∂ j C( ⃗ ϑ) remains the same.In other words, we are not able to find more linearly independent operators and thus, the dimensional expressivity of the system cannot be increased.This means that the manifold of reachable states does not have a maximal local dimension and hence there will be some states to which our initial state cannot evolve.Therefore the system is not purestate controllable.
There may be cases where, for given C n seq ( ⃗ ϑ) and Ân+1 , there exist two different parameters ϑ n+1 and θn+1 such that This is common in cases where θj = 0 for every 1 ≤ j ≤ n + 1.Looking at Eq. (10), note that using repeated parameters (e.g.α = β) will make the coefficients preceding the commutators have the same absolute value (e.g.α 2 β = αβ 2 ).This is evidently unfavorable to generate more linearly independent ∂ j C( ⃗ ϑ) due to the symmetries created.
In principle, it would be necessary to prove that the expressivity of C n+1 seq does not increase for any ϑ n+1 ∈ R.However, as long as there exists one ϑ n+1 that increases the dimensional expressivity for an operator Ân , the set of { θn+1 } ⊂ R that would not raise the expressivity will have measure zero.This can be justified as follows.Assume that the first n parameters are independent (i.e.det (S n ) ̸ = 0), with n less than the maximal dimensional expressivity, and that there exist some parameters that can increase the expressivity.This implies that the analytic function f ( ⃗ ϑ) := det (S n+1 ) is not constant 0. The set of parameters that would not increase the expressivity belong to f −1 (0).With the regular level set theorem [29], f −1 (0) is an n-dimensional manifold in the (n + 1)-dimensional parameter space P. Thus, the set of parameters that would not increase the expressivity has Lebesgue measure zero in P. In other words, by choosing ϑ n+1 randomly we increase the dimensional expressivity with probability 1.
The next section uses these ideas to systematically design quantum circuits that can be used to determine for a controlled quantum system whether it is pure-state controllable or not.

Controllability test
Given a system with operators Ĥj with 0 ≤ j ≤ m (cf.Eq. ( 1)), we define the parametric quantum circuit where |ψ 0 ⟩ is the initial state of the circuit, m the total number of controls in the system and n l the number of layers in the circuit.A diagram of this circuit is shown in Figure 1 for a three-qubit example.The initial state |ψ 0 ⟩, chosen and fixed at the start of the circuit, can be any pure state.The number of layers n l should be decided at the start of the algorithm.All gates in C P SC ( ⃗ ϑ) are parametric with different parameters ϑ k , ranging from ϑ 0 to ϑ n l m−1 .Each of the n l layers in the circuit has a similar architecture: It starts with the rotation R0 around the drift Hamiltonian, an entangling gate if it includes time-independent qubit couplings, and then a sequence of local gates, from R1 to Rm , that use all the different controls sorted by a chosen order.
The pure-state controllability test for a system evolving under the Hamiltonian (1) is then defined as follows: If the circuit ( 14) reaches maximal expressivity, the system is controllable.A schematic flowchart of the pure-state controllability test is shown in Figure 2. If the maximum expressivity of 2d − 1 for a Hilbert space with dim(H) = d has not been met with n l layers, another layer can be added (encompassing a full set of rotation gates with their respective new parameters) and the test can be repeated for the new circuit with n l + 1 layers.By definition, the dimensional expressivity can only augment at the rate of one per parameter ϑ j at maximum.For a system with m controls, there are a total of m + 1 parameters per layer.Therefore, the minimum number of layers needed to reach maximum expressivity for m controls is Since layers may have some redundant parameters, the dimensional expressivity may not necessarily rise at the maximum rate and more layers may have to be included.Consequently, the algorithm is best started with the minimum number of layers required to achieve maximum expressivity and additional layers shall be concatenated as needed.
It may as well happen that the dimensional expressivity remains the same even with the inclusion of a new layer.In this case the test stops, as the dimensional expressivity will not further increase.In instances where the dimensional expressivity reaches a plateau, it is necessary to double-check using a different array of random parameters ⃗ ϑ and repeat this comparison with the n l -and n l + 1-layered circuits, following the reasoning explained in section 3.1.Using a random set of parameters will yield an answer on whether the expressivity can be increased or not with probability 1.If the dimensional expressivity remains at a value less than 2d − 1 for a sufficiently large set of different random parameters, then the system is labelled not pure-state controllable and the test concludes.The algorithm will always end with an affirmative or negative result regarding pure-state controllability.The loop in Figure 2 will be exited under one of the following conditions: Either maximal dimensional expressivity is reached or a last layer exclusively composed of redundant parameters is found.In other words, the method ends when the finite upper bound of the dimensional expressivity has been reached or when the expressivity before and after the addition of a new layer remains the same.Since the dimensional expressivity is always an integer, the loop must conclude in a finite number of iterations.
Parameters with repeated values in the same rotation gates (e.g.ϑ p = ϑ q on gates Rj (ϑ p ) and Rj (ϑ q ) for a certain j) are usually detrimental to reach maximum expressivity.A trivial example is the case of ⃗ ϑ = ⃗ 0, where the maximum possible dimensional expressivity of C P SC ( ⃗ 0) is always m + 1, with m the number of local controls.
A more detailed description of the algorithm can be found in Appendix A. This includes stepby-step pseudo code and the indication which parts of the method can be performed classically and which parts with quantum computations.

Examples
To illustrate the described algorithm, we consider a four-qubit array with the following Hamiltonian: The first term encompasses the free-qubit Hamiltonians and the second one contains the timeindependent couplings.The qubit frequencies ω j and the coupling strengths J k,k+1 have been chosen to fit the ones normally used in superconducting circuits [30] and their exact value can be found in Table 1.The last operator, Ĥctrl (t), contains all the relevant information about the controls, Coupling strengths (MHz)  (16).The frequencies and the coupling strengths have been chosen in a range that is common for superconducting circuits.
including their number and type.We choose two configurations of controls to study two separate systems with Hamiltonian ( 16), one that is purestate controllable and one that is not.
First, we assume the controls from Eq. ( 16) to be This system is operator controllable, as proven by the Lie algebra rank condition [5] and the graph method [4].This in particular implies that it is also pure-state controllable.A diagram of the system may be found in Figure 3.
Since the system only has two controls, each layer of the circuit will have exactly 3 gates-the entangling gate involving the drift and the two related to the local controls coupling to σ1 x and σ2 x , respectively.We have chosen |ψ 0 ⟩ = |0000⟩ (in the logical basis of the free qubits) as the initial state of the circuit and n l = 11, matching the minimal number of layers to obtain maximum dimensional expressivity (cf.Eq. ( 15)).For a circuit acting on a four-qubit array, it has a value of expr dim = 31.We have generated a random set of parameters ⃗ ϑ ∈ [0, 2π] 33 (since in this case (m + 1) • n l = 33).We have classically simulated the parametric quantum circuit and calculated the S C P SC ,n ( ⃗ ϑ) matrices from Eq. (7).We have both determined the redundant parameters in the circuit and estimated the dimensional expressivity.
In these simulations, the maximum dimensional expressivity is steadily reached, with every layer raising it by 3. The maximum value of expr dim = 31 is achieved with the first parameter of the last layer, proving that the system is pure-state controllable.In this example the minimum number of layers that we had chosen was enough to reach maximum expressivity.The same behaviour has been observed for all the dif- Figure 3: Four-qubit system that is pure-state controllable, cf.Eqs. ( 16) and (17).
ferent random sets of parameters ⃗ ϑ tested.The same configuration of gates was further tested using different random initial states |ψ 0 ⟩, yielding similar results.
Second, we present a system that is not purestate controllable, whose control operators are cf. Figure 4.The dimension of its Lie algebra L can be found following the method described in Ref. [5].To this end, a basis of L must be generated, whose cardinality will be equal to the dimension of the Lie algebra.Given a system following Equation (1), we can compute a basis by starting with a linearly independent set of the elements of zeroth order: The drift Ĥ0 and the control operators Ĥj (for 1 ≤ j ≤ m).We complete the basis by including the nested commutators of the elements of zeroth order that are linearly independent, i.e.
Since the dimension has an upper bound, this method must converge in a finite number of iterations.In the case of Equations ( 16) and ( 18), we reach a dimension of dim(L) = 120 < dim(su( 16)) = 255, which only proves that the system is not operator controllable.The system would be pure-state controllable if and only if with ρ 0 = |0000⟩ ⟨0000| [5].We confirm that the system is not pure-state controllable since dim (Lie ([ρ 0 , L])) = 28 < 30 for the current system.Even though there are more local controls than in the first example, the system is not controllable due to their positions.Similarly as before, we create a circuit with four gates (related to the drift and the three local controls) per layer.We choose a minimum number of layers n l = 8 (different to the one before due to the different Figure 4: Four-qubit system that is not pure-state controllable, cf.equations ( 16) and (18).
At the end of the last layer the dimensional expressivity yields a total of 29 out of the 31 that would imply pure-state controllability.Following the flowchart depicted in Figure 2 we have added a new layer (n l = 9) with a new set of random parameters and repeated the dimensional expressivity analysis.According to our simulation, the new layer contains only redundant parameters (i.e. the expressivity remains at 29), which stops the algorithm and means that the system is not pure-state controllable.To verify the validity of this outcome, we have repeated the test for multiple different random sets of parameters.In every instance the same result is reached, which leads to the conclusion that the system is indeed not pure-state controllable, as discussed in section 3.1.

Operator controllability test using dimensional expressivity analysis
Operator controllability is the relevant type of controllability for a qubit array in order to perform all quantum logic gates.Its connection to the dimensional expressivity of a circuit is less evident, since dimensional expressivity is related to the different states that can be reached.The Choi-Jamiołkowski isomorphism [31,32] allows to bridge the gap with a map between operators on a Hilbert space H and states in H ⊗ H.It is used, for example, in quantum process tomography, allowing to employ techniques from state tomography to operators [33].Similarly, by doubling the number of qubits, we can exploit the channelstate duality between operators in the original system and states in the bipartite extended system for controllability analysis.

Lifting pure-state to operator controllability via the Choi-Jamiołkowski isomorphism
Let us assume a qubit array with Hamiltonian (1) for which we seek to determine operator controllability.This system with Hilbert space H and dimension dim(H) = d will henceforth be referred to as the original system.We then define a bipartite extended system in H ⊗ H composed of the original system and the same number of auxiliary qubits.To simplify the argument, we first assume no dynamics over the auxiliary qubits.Later we extend our discussion to include some local Hamiltonians on the auxiliary qubits.Given any operator Ô ∈ L(H ⊗H), we write ÔA to indicate that the operator only acts non-trivially on the partition of the original system (A), i.e.
for some operator Q. Analogously, we write ÔAB for operators that act non-trivially on both partitions (the original system and the auxiliary qubits).Neglecting the local contributions of the auxiliary qubits, the Hamiltonian of the extended system is given by where q is the number of qubits in the original system.We assume that the extended system can be prepared in a maximally entangled state, where {|e i ⟩} d−1 0 is an orthonormal basis of H.We define the circuit on the extended system The rotations RA k (α) are given by the drift (k = 0) and the control operators (1 ≤ k ≤ m) of the original subsystem: with Ĥk given in Eq. (1).
Parametric circuit for the extended system required to perform the operator controllability test (23) for a three-qubit system.The qubits q i with i = 0, 1, 2 constitute the original system, whereas q j with j = 3, 4, 5 are the auxiliary qubits.
A visual representation of the circuit is found in Figure 5.The parameter space P ∋ ⃗ ϑ is assumed to be connected and compact without boundary (e.g. with every coordinate ϑ i being cyclic).The final of the circuit will always be of the form with Û ( ⃗ ϑ) a unitary operator depending on the circuit's parameters.
Our goal is to prove that dimensional expressivity of the extended system is enough to determine operator controllability of the original system.To this end, we make use of the Choi-Jamiołkowski isomorphism [31,32,34].The map it describes is written as for any operator Â in the Hilbert space of linear operators on the Liouville space and the unnor- an orthonormal basis of H.
Identifying Â in Eq. ( 26) with Û ( ⃗ ϑ) in Eq. ( 25), we know that The operators Û ( ⃗ ϑ) are unitary for every ⃗ ϑ ∈ P, hence purity-preserving.We transform the density matrix representation from Eq. ( 27) into a pure-state representation, resulting in Therefore, there exists an embedding between the evolutions Û (P) that are generated using a combination of rotations given by the controls and the final states of the circuit C A OC (P).A system with traceless operators as in Eq. (1) and dim(H) = d is operator-controllable if and only if the manifold of the unitary evolutions that can be generated Û Ĥ is isomorphic to SU (d).Evidently, Û (P) ⊆ Û Ĥ ⊆ SU (d).Since the parameter space P is connected and compact without boundary, Û (P) = SU (d) if and only if dim( Û (P)) = dim(SU (d)).Thus, using Eq.(28), the system will be operator-controllable if dim(C A OC (P)) = dim(SU (d)), i.e., if the dimensional expressivity of the circuit From here we proceed analogously as the purestate controllability test from section 3.1.We present the outline of the operator controllability test in Figure 7.If the dimensional expressivity is less than d 2 − 1, we inspect the parameters in the last circuit layer.If they all are redundant, the test ends and the system is deemed not controllable.Indeed, if all parameters in the last layer are redundant, we are unable to find more linearly independent operators in the dynamical Lie algebra of the system.If the number of linearly independent elements of the algebra (i.e.number of independent parameters) is less than dim(SU (d)), there exist some unitary operations that cannot be implemented.Therefore, the system is not operator controllable.This step must be checked with multiple arrays of random parameters ⃗ ϑ, as there may be a set of arrays of parameters with measure zero over P that yield a lower value for the dimensional expressivity.The same arguments we used in section 3.1 apply here, as C A OC (P) is a manifold of states in H ⊗ H.If at least one parameter in the last circuit layer is independent, the test continues.We iterate by adding a new layer and calculating the circuit's expressivity.The algorithm will eventually come to an end, either with maximal value for the dimensional expressivity or with a layer of redundant parameters at the end of the circuit.
We now move to a more realistic setting that incorporates dynamics in the auxiliary qubits.We undertake this by including the drift of the Circuit on the extended system required to perform the operator controllability test (31) for a threequbit system.The qubits i with i = 0, 1, 2 constitute the original system, whereas q j with j = 3, 4, 5 are the auxiliary qubits.The rotations RB 0 (cf.Eq. ( 32)) include the free-qubit dynamics of the auxiliary qubits.
auxiliary partition.The new Hamiltonian of the bipartite system is then It results in the following circuit to test operator controllability Note that the parameters ϑ j(m+1) of the gates RA 0 and RB 0 in the same layer j are always the same because there is no active control over these operators-they are due to the time-independent part of the Hamiltonian.In other words, these gates are implemented by letting the system evolve a certain amount of time t = ϑ j(m+1) /2.The number of parameters per layer for a system with m controls remains equal to m + 1, despite having an extra rotation gate per layer.A diagram of the new circuit is found in Figure 6.If we choose an orthonormal basis for the B partition consisting of the eigenstates of the auxiliary qubits, then The only difference between equations ( 28) and ( 33) is the local phases φ i ( ⃗ ϑ), which are uniquely determined for any array of parameters ⃗ ϑ.These do not change the value of the dimensional expressivity since for any array ⃗ ϑ there exists a neighborhood in which This implies the local dimension of the manifold of reachable states to be identical, i.e., the dimensional expressivity to be the same.Therefore, we can include the local Hamiltonians of the auxiliary qubits in our calculations to describe a more realistic model and still use the Choi-Jamiołkovski isomorphism to design the parametric quantum circuit (31).

Controllability test
Once again we consider a qubit array with traceless Hamiltonian (1) and the corresponding extended system, composed of the original q-qubit array and q more auxiliary qubits.We assume the extra qubits to have arbitrary natural frequencies ω j , such that the Hamiltonian of the extended system is given by Eq. ( 29) and the parametric quantum circuit by Eq. (31).As shown in Figure 6 for a three-qubit example, for a system with m controls the circuit has exactly m + 1 parameters per layer.As for pure-state controllability, it is encouraged to choose a number of layers n l that would a priori be sufficient to reach the maximum dimensional expressivity.In the case of operator controllability, it is dim(su(d)) = d 2 − 1, with d the Hilbert space dimension of the original system, d = 2 q 2 .Thus, the condition for the minimum number of layers to obtain the maximal dimensional expressivity is With the dimensional expressivity we find the maximum number of linearly independent states in H ⊗ H that can be generated in a neighborhood of C AB OC ( ⃗ ϑ).This in turn yields information about the maximum number of linearly independent operators on H that can be generated by the original system around the identity.Since we know that these operators belong to the Lie algebra su(d) we simply want to determine if we can span all the d 2 − 1 dimensions in the algebra, i.e. having operator controllability, or not.
The operator controllability of a system evolving under the Hamiltonian (1) is determined as follows: If the circuit (31) has dimensional expressivity equal to d 2 − 1, then the system is operator controllable.Analogously to the pure-state controllability test, if this value for the dimensional expressivity is not reached, another layer should be concatenated at the end of the circuit.If all the new parameters in the last layer are redundant, then the system is not operator controllable (with a probability of measure 1); otherwise, the process of concatenating layers shall be repeated.The main steps of the algorithm is displayed in Figure 7. Similarly to section 3.1, it is important to to ensure the validity of a result of "not operator controllable" by repeating the test for different arrays of random parameters.
Analogous to Section 3, the pseudo code of the algorithm can be found in Appendix A. 2 We only claim that the value for the maximal dimensional expressivity is d 2 − 1 (with d = 2 q ) for the circuits C AB OC (31).Other parametric quantum circuits acting on H ⊗ H could in principle reach higher values of expressivity, up to 2 2q+1 − 1 Coupling strengths (MHz)   (36) and the auxiliary qubits necessary for the circuit (31).
Figure 8: Example of a three-qubit system that is operator-controllable, cf.Eq. (37)

Examples
In the following we consider a three-qubit array with Hamiltonian The second term, containing the timeindependent two-qubit couplings, has been modified to σk z σk+1 z simply to showcase a qubit interaction different from the one in the previous examples.The qubit frequencies ω j and the coupling strengths J k,k+1 are listed in Table 2.We take two different Ĥctrl (t) to study an example that is operator controllable and one that is not.
The first one is given by see Figure 8.It is operator controllable as can easily be proven by the Lie algebra rank condition [5] and the graph method [4].
Since we have 3 controls in the original threequbit system, the minimum number of layers needed to reach the maximum value of dimensional expressivity for the bipartite system, expr dim = 63, is n l = 16 according to Eq. (35).The orthonormal basis used to define the maximally entangled state |ψ M E ⟩ is the logical basis of Figure 9: Example of a three-qubit system that is not operator-controllable, cf.Eq. (38).
the free qubits.Last, we generate a random set of parameters ⃗ ϑ ∈ [0, 2π] 64 .Maximum dimensional expressivity of 63 is found for the last parameter of the last layer, confirming that the system is operator controllable.
For the second example, we choose a different set of controls, see Figure 9, making the system not controllable.
We repeat the same procedure as before, since the number of controls is again m = 3.At the end of 16 layers the circuit only reaches expr dim = 31, which is less than the 63 needed for operator controllability.We could add another layer to verify that every new rotation gate will have a redundant parameter.However, in this case it is sufficient to inspect the rank of the matrices S n from Eq. (7) in the last layers.We find that the last independent parameter appears at the end of the tenth layer, with all the remaining ones being exclusively formed by redundant parameters.This is a sufficient condition to determine that the system is not operator controllable (as long as it is verified with multiple sets of random parameters).We emphasize that it is important to corroborate every "not controllable" result with different arrays ⃗ ϑ chosen at random.Selecting ⃗ ϑ in a nonrandomized fashion may lead to cases where the dimensional expressivity is lower than the maximum value reached with other different parameters.This would yield wrong results in terms of controllability.It is easily rationalized in terms of symmetries of the commutators [ Ĥi , RA k (ϑ j )].These are linked to the partial derivatives of the circuit ∂ i C AB OC ( ⃗ ϑ) and to the dimensional expressivity of the circuit.Performing further numerical tests on the previously discussed examples, we have experimented with selecting parameters instead of choosing them at random.Wrong results with lower dimensional expressivity arose when all the parameters were chosen to be the same, e.g.ϑ j = 1 for every j.In every instance, these problems vanished as soon as we generated a new set of random parameters.
Another important issue concerns the minimum tolerance τ used to determine the rank of the S n matrices.More precisely, τ represents the threshold at which the values of the singular value decomposition of S n are considered zero.τ is crucial to determine the different redundant parameters and the expressivity of the circuit.If τ is too high, then some linearly independent vectors might be deemed dependent by mistake, which would revert on a wrong lower value of the circuit expressivity, potentially turning a controllable system into a fake non-controllable one.Conversely, if τ is too small some errors might start to add up to make linearly dependent vectors look as if they were independent, falsely showing some parameters as independent.This would in turn raise the dimensional expressivity, usually above the d 2 − 1 threshold that we know to be valid for the case of the operator controllability test.To avoid these cases, it is advisable to use operators with similar orders of magnitude and try different ranges for τ depending on the order of magnitude of the operators Ĥj from Eq. (1).If the dimensional expressivity analysis is performed on quantum hardware, the tolerance τ will also depend on the device noise.Indeed, the accuracy of the measurements and the circuit dynamics will take a toll on the accuracy of the rank of the matrices S n .Inevitably, noisier devices will require higher tolerances to determine whether there are redundant parameters (i.e.whether det(S n ) = 0) or not.

Discussion and Conclusions
We have introduced two hybrid quantum-classical algorithms to test pure-state and operator controllability of qubit arrays.As opposed to usual Lie rank and graph methods, the presented algorithms are run directly on a quantum circuit designed to mimic the dynamics of the quantum system to be studied.The method is also devised as an alternative to the cases where the dynamical Lie algebra can no longer be evaluated analytically or numerically on a classical computer.We have showcased the capabilities of the proce-dure with four paradigmatic examples that cover all scenarios for pure-state and operator controllability.
A useful application of these tests is the resource-efficient design of quantum chips.Our algorithm provides a systematic way to deduce the minimal number of local controls and qubit couplings required to maintain controllability, as a prerequisite of universal quantum computation.In other words, it allows one to identify redundant controls and thus to ease scaling up the quantum chip size.Importantly, the tests allow to obtain this information before the devices are built, as long as the associated quantum circuit can be implemented on a different device.Note that while the rank analysis of the S n matrices scales with the size of the system Hilbert space, this does not pose a fundamental limitation.It can be overcome by mapping the rank computation to a quantum device.More precisely, the quantum device would then be used to find the lowest eigenvalue of S n in order to determine whether a parameter is redundant or not.This permits the efficient identification of redundant parameters and the removal of their parametric gates in the circuit.Noise in the device running our hybrid algorithm will limit the accuracy of the lowest eigenvalue and thus determine the minimum threshold for an eigenvalue to be considered zero.
In addition to its practical aspects, at the conceptual level, our work has revealed the close connection between the controllability of quantum systems and the dimensional expressivity of quantum circuits.In particular, this insight arises from the relation between the states that can be reached in a controllable system and the final states that can be produced in a parametric quantum circuit.The dimensional expressivity analysis allowed us to efficiently quantify the circuit expressivity.Its search for redundant parameters was essential in determining which controls contributed to reach more states in the Hilbert space.The link between the pure-state and operator controllability test is the inclusion of the Choi-Jamiołkovski isomorphism that creates a map between operators in a Hilbert space and the states of the extended bipartite space.
Variational quantum algorithms have previously been used to improve the design of optimal pulses in quantum systems [35].Quantum optimal control theory in general [7,6] encompassses both the design of the pulse shapes, i.e., control synthesis, and controllability analysis.The controllability tests described here thus extend the use of parametric quantum circuits to the second pillar of quantum optimal control.Quantum optimal control is also closely related to system characterization where controls can be interleaved with free evolutions [36,37] or applied continuously [38].
In future work, it will be interesting to study systems with non-local controls, e.g.tunable twoqubit couplings.Moreover, it may be possible to expand our approach to systems other than qubit arrays.To this end, the key task will be to find a mapping from the non-qubit system to the associated quantum circuit that runs on a qubit array.The problem of mapping certain dynamics to a quantum circuit has already been a subject of extensive research, for example, when using parametric variational algorithms for calculating the electronic structure of molecules [39,40] or their quantum dynamics [41].An interesting future perspective is to explore the extension of our approach to the controllability of subgroups.This is sometimes referred to as G-controllability, where G is a subgroup of the unitary group U (n).This would be relevant both to open quantum system control and machine learning.While it is not straightforward in the general case, our method can likely be used to analyse certain cases of Gcontrollability but dedicated work in this direction is needed to give a more definitive answer.Finally, an intriguing question is how the removal of redundant controls affects the minimum time at which certain dynamics can be implemented, i.e., the quantum speed limit of the system.A controllable system with a new control added can have the same or a lower minimum time for a state transfer or unitary gate.Conversely, removing redundant controls might incur a higher minimum time.Most likely, quantum device design will have to balance the requirements for controllability and operation speed.

A Outline of the algorithm
This appendix includes an outline for the methods described in Figures 2 and 7 in the form of pseudo code.Algorithm 1 displays the main steps for applying the dimensional expressivity analysis to a circuit for the pure-state controllability test as defined in Equation ( 14) and the operator controllability test given in Equation (31).There are two main differences between the two cases: The circuit definition (including the rotation gates Rj (α) and the initial state |ψ 0 ⟩) and the maximum dimensional expressivity expr dim that the circuit has to reach to determine whether the system is controllable or not.
For a pure-state controllability test, one must set test_type = ′ P SC ′ .The circuit description is passed in terms of a list of parameters para ( ⃗ ϑ from Equation ( 3)), a list of operators for the rotation gates Ĝlist (given by the drift and the control operators, cf.Equation ( 8)), the initial state |ψ 0 ⟩ (which can be chosen freely) and the parameter index last_lay at which the last circuit layer starts.A numerical tolerance tol is also required for computing the rank of the matrices S C,n (cf.Equation (7).
For the operator controllability test, test_type should be ′ OC ′ .The circuit should be defined including the auxiliary qubits, as depicted in Figure 6.This encompasses the definition of the generators of rotations which are passed as Ĝlist .In this case, the initial state |ψ 0 ⟩ must be the maximally entangled state |ψ M E ⟩ shown in Equation (22).The rest of the inputs are treated analogously to the previous case.
Finally, for either type of controllability, the computation of the S C,n matrices can be done with classical numerical calculations (as shown in Algorithm 2) or it may be achieved using real quantum circuits, as seen in [21].This manuscript showcases examples using the former one, although the latter is the intended version for the devised hybrid quantum-classical controllability test.

Figure 1 :
Figure 1: Three-qubit example of the parametric circuit C P SC ( ⃗ ϑ) (14) for testing pure-state controllability with initial state |000⟩ in the qubits' logical basis.Each layer (only two displayed in the diagram) includes an entangling gate R0 and a sequence of local gates Rj (with j ≥ 1), one for every control present in the qubit array.

nl = nl + 1 Figure 2 :
Figure 2: Flowchart for the pure-state controllability algorithm.The yellow rhomboids show the initial inputs necessary to define the circuit C P SC ( ⃗ ϑ).

nl = nl + 1 Figure 7 :
Figure 7: Flowchart for the algorithm testing operator controllability.The yellow rhomboids show the initial inputs necessary to define the circuit C AB OC ( ⃗ ϑ).

Table 1 :
Parameters for the Hamiltonian

Table 2 :
Parameters for the Hamiltonian