Gradient descent reliably finds depth- and gate-optimal circuits for generic unitaries
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: Next we'll be talking about the paper "Gradient descent reliably finds depth- and gate-optimal circuits for generic unitaries".
Jane: The paper was written by Janani Gomathi and Alex Meiburg from Perimeter Institute for Theoretical Physics and University of Waterloo and Leibniz Universität Hannover.
Tom: Stay tuned as we take you through the paper and discuss its implications.
Title: Tom: Welcome back to the show, everyone. Today we’re looking at a paper with a pretty bold title: “Gradient descent reliably finds depth- and gate-optimal circuits for generic unitaries.” Jane, I have to say, that title is doing a lot of heavy lifting. “Reliably” is a strong word in this field.
Jane: It really is, Tom. And that’s exactly why I got excited when I first skimmed this. For years, the conventional wisdom has been that finding an optimal quantum circuit for a random unitary is basically a combinatorial nightmare. You’d have to search through discrete gate arrangements, and gradient descent would get stuck in local minima almost every time.
Tom: Right, and the paper basically says, “Actually, no.” The authors, Alex Meiburg and Janani Gomathi from Perimeter Institute, they show that if you just pick the right circuit skeleton upfront, plain old gradient descent finds the optimal circuit every single time. Not sometimes. Every time.
Jane: And that’s the part that made me stop and re-read the abstract. They’re not talking about structured unitaries that come from quantum programs. They’re talking about generic unitaries — the ones that use up every possible parameter and require the absolute maximum circuit depth. That’s the hardest case you can throw at a synthesis algorithm.
Tom: Exactly. So if you’ve got an n-qubit unitary, it has four to the n minus one real parameters. That’s a huge number even for small n. And the paper says gradient descent finds a circuit that hits that parameter bound exactly — depth-optimal, gate-optimal, everything.
Jane: And the really surprising part to me is that this contradicts earlier work. There was a paper by Ashhab and others a couple years ago that suggested gradient descent would only succeed with some probability that dropped to zero as qubits grew. This new paper says the failures in that earlier work weren’t because gradient descent is weak — they were because the circuit skeletons were chosen badly.
Tom: So the skeleton is the arrangement of CNOT gates, right? The discrete part of the circuit that you don’t optimize over.
Jane: Precisely. And if you pick a skeleton that has hidden symmetries, you effectively lose parameters. The circuit looks like it has enough gates, but it doesn’t actually have enough degrees of freedom to represent the target unitary. So gradient descent is trying to fit a fifteen-parameter object into a twelve-parameter box. It can’t.
Tom: And that’s the key insight that I think is going to change how people approach this problem. It’s not about making gradient descent smarter. It’s about not handicapping it with a bad skeleton. I’m really curious to hear how they actually pick the good skeletons, because that’s the part that seems like it could be tricky for bigger systems.
Jane: We’ll get there, Tom. But first, let’s just sit with how surprising this is. The paper’s title says “reliably,” and their experiments back that up. Hundreds of trials across two, four, and six qubits, and it never failed. That’s a strong empirical claim.
Tom: And it’s not just fully connected hardware either. They tested it on restricted connectivity, like real chips. And it still worked. That’s the part that makes me think this could actually matter for real quantum computers, not just theory. Let’s dig into the method next.
Summary: Tom: So we’ve established the headline: gradient descent finds optimal circuits for generic unitaries if you pick the right skeleton. But Jane, what does the actual method look like? How do they set this up?
Jane: Okay, so the setup is pretty elegant. You write the circuit as alternating layers of single-qubit gates and CNOT gates. Each single-qubit gate has three Euler angles, so it’s a continuous parameter. The CNOT arrangement is fixed — that’s the skeleton. Then you define a cost function based on the trace distance between your circuit and the target unitary.
Tom: And then you just run gradient descent on those angles?
Jane: Essentially, yes. But they have a nice trick to speed things up. Instead of doing pure gradient steps, they use a singular value decomposition to directly find the optimal single-qubit gate at each site, given the current state of the rest of the circuit. It’s like a coordinate descent where each step is exact.
Tom: So it’s not really gradient descent in the strict sense, then?
Jane: It is, in spirit. They argue that the SVD step is equivalent to what gradient descent would do anyway with the right learning rate and enough iterations. It just gets there faster and avoids the headache of tuning hyperparameters. That’s a practical win.
Tom: And the cost function — they’re measuring the trace distance, which means they’re accounting for global phase, right? Because two unitaries that differ only by a global phase are physically identical.
Jane: Exactly. They use the absolute value of the trace of the product of the target unitary and the conjugate transpose of the circuit unitary. If that’s close to the dimension of the Hilbert space, you’ve got a match. They aim for an error below ten to the minus eight, which is the typical threshold for useful quantum computation.
Tom: Now, the part I found most interesting — how do they decide how many layers they need? Because that’s the parameter counting argument.
Jane: Right. Each layer of single-qubit gates contributes 3n parameters, but each CNOT effectively eats two parameters because of its symmetries. A CNOT is invariant under Z rotations on the control and X rotations on the target. So you lose two degrees of freedom per CNOT.
Tom: So they work out that for an n-qubit system, you need a certain number of layers, and that number scales like four to the n divided by n. That’s the depth-optimal bound.
Jane: And the really clever part is how they choose the CNOT arrangement within each layer. For four qubits, they use a repeating motif that cycles through all possible pairings. For six qubits, they use something called a one-factorization of the complete graph — it’s a way of pairing up all qubits such that every qubit gets connected to every other qubit as quickly as possible.
Tom: And that’s what avoids the hidden symmetry problem. If you keep pairing the same two qubits together, you effectively build a two-qubit unitary with redundant parameters. But if you cycle through all pairings, you get maximal mixing.
Jane: Right. And the paper shows that when you do that, the optimization just works. They ran it on two, four, and six qubits, and it converged every single time, regardless of the random initialization of the angles.
Tom: That’s the empirical claim that I want to dig into. How confident are we that this scales? Because six qubits is still pretty small.
Jane: That’s a fair question, and I think the authors would agree that more testing is needed. But the fact that it works perfectly for six qubits, which requires three hundred forty-one layers and thousands of parameters, is already pretty impressive. Let’s bring in Lu and Meng to get their take on the implications.
Improvements: Tom: We’re back with Lu and Meng. Lu, you’ve been quiet — what do you think about the improvements this paper suggests over existing methods?
Lu: Honestly, Tom, I think the biggest improvement is conceptual. The field has been treating unitary synthesis as a search problem — you have to try many skeletons and hope one works. This paper says, no, you can design the skeleton deterministically using graph theory, and then the continuous optimization just works. That reframes the entire problem.
Meng: But Lu, I want to push back a little. From an engineering standpoint, the paper only demonstrates this up to six qubits. A real quantum computer has dozens or hundreds of qubits. The parameter count grows exponentially. Even if gradient descent doesn’t get stuck, the sheer number of parameters might make this impractical.
Jane: That’s a fair point, Meng. The paper doesn’t claim to solve scaling for large systems. But the fact that it works reliably for the systems they tested is already better than the random search approaches, which had success rates dropping to near zero even at four qubits.
Lu: And I’d add that the improvement isn’t just about speed — it’s about reliability. The paper shows that the failures in earlier work can be explained by underparameterized skeletons. That’s a diagnosis that lets you avoid the problem entirely. You don’t need to search over skeletons if you can prove your skeleton has enough effective parameters.
Meng: So the improvement is really about knowing when you’ve got enough parameters, rather than hoping you do?
Lu: Exactly. And they even tested underparameterized circuits deliberately. When you’re even one layer short, the cost function plateaus at around ten to the minus three — nowhere near the precision you need. So it’s not a graceful degradation. You either have enough parameters or you don’t.
Tom: That’s a really clean result. And it also explains why the random search in the earlier paper failed — sometimes the random skeleton was underparameterized, and no amount of optimization could fix that.
Jane: Right. And they even did a calculation in the appendix showing that the failure probability in the random search matches the probability of picking a skeleton with hidden symmetries. That’s a nice confirmation of their theory.
Meng: Okay, but what about the connectivity constraints? The paper says they tested on restricted topologies, like a line of qubits or a star. How does that change the layer count?
Jane: It just increases the number of layers you need, because you can’t use as many CNOTs per layer. But the parameter counting still works — you just need more layers to reach the same total parameter count. And the experiments show it still converges reliably.
Meng: That’s actually really encouraging for real hardware. If you can just pick a skeleton that respects the chip’s connectivity and has enough layers, gradient descent will find the circuit. That’s a much simpler recipe than what people usually do.
Lu: And I think that’s the real contribution here. It’s not a new optimization algorithm — it’s a recipe for choosing the circuit structure so that the optimization you already have will succeed. That’s the kind of insight that can be immediately adopted by practitioners.
Tom: So the improvement is essentially: stop guessing the skeleton, design it properly, and let gradient descent do its thing. That’s a much simpler workflow. I’m curious what Lalam thinks about the broader implications.
Conclusion: Tom: Alright, we’re wrapping up our discussion of “Gradient descent reliably finds depth- and gate-optimal circuits for generic unitaries.” Lalam, you’ve been listening — what’s your take on the big picture?
Lalam: I think the most impactful vision here is that this removes a major barrier to practical quantum compilation. Right now, when you want to run a quantum algorithm on real hardware, you often have to accept a circuit that’s far from optimal because the compiler can’t find anything better. This paper suggests that with the right skeleton, you can get optimal circuits reliably, even with restricted connectivity.
Meng: And that matters for the engineering side, because it means you can spend less time on compilation and more time on the actual algorithm. The compilation step becomes more predictable.
Jane: I also think the cultural impact is interesting. This paper challenges the assumption that hard optimization problems always require clever heuristics or expensive search. Sometimes the right framing — in this case, choosing the right skeleton — makes the problem tractable with a simple tool.
Lu: I’d go further. The fact that gradient descent works this well on a problem that’s supposedly NP-hard suggests that the hard instances might be rare or pathological. That’s a pattern we see in other areas of machine learning too — the worst-case complexity doesn’t always reflect what happens in practice.
Tom: That’s a great point, Lu. And it makes me wonder whether this approach could extend to other synthesis problems, like finding circuits with low T-count or optimizing for specific gate sets.
Jane: The paper focuses on the continuous gate set, but the principle — design the skeleton to avoid symmetries, then optimize the continuous parameters — seems pretty general. I wouldn’t be surprised to see follow-up work applying this to Clifford+T circuits or other discrete gate sets.
Meng: And from a practical standpoint, the fact that they tested on real chip topologies from IBM’s one hundred twenty-seven-qubit design is a good sign. It’s not just a theoretical toy — it’s a method that can be dropped into an existing compilation pipeline.
Lalam: I think the deepest implication is cultural. This paper shows that careful mathematical analysis of a problem’s structure can turn an apparently intractable optimization into a routine one. That’s a reminder that before we reach for exotic algorithms, we should ask whether we’ve chosen the right representation of the problem.
Tom: Well said, Lalam. So to summarize: gradient descent reliably finds optimal circuits for generic unitaries, as long as you pick a skeleton that avoids hidden symmetries. The paper demonstrates this for two, four, and six qubits, with and without connectivity constraints, and explains why earlier work failed.
Jane: And the takeaway for practitioners is simple: design your CNOT layout using graph factorization, make sure you have enough layers, and let gradient descent do the rest. It’s a clean, practical result with a solid theoretical explanation.
Tom: That’s a wrap on this paper. Thanks to everyone for the great discussion. Next up, we’ve got a paper on error correction thresholds that I think is going to spark some debate. See you then.
Jane: Bye, everyone!
Janani Gomathi, Alex Meiburg
Perimeter Institute for Theoretical Physics · University of Waterloo · Leibniz Universität Hannover
quant-ph, cs.LG
Submitted: 2026-08-17
Updated: 2026-08-18
Comments: 14 pages, 17 figures
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 80/100
The gist: decomposing a unitary operator, given as a full 2 n times 2 n matrix, into a quantum circuit composed of one-qubit and two-qubit gates from a continuous gate set.
Key concepts
- Generic Unitaries
- These are unitaries that use every possible parameter and require the absolute maximum circuit depth. They represent the hardest case for quantum circuit synthesis algorithms.
- Circuit Skeleton
- This is the fixed arrangement of CNOT gates in a quantum circuit that is not optimized. Choosing a skeleton with hidden symmetries can reduce the effective degrees of freedom, making optimization impossible.
- Trace Distance
- This is the cost function used to measure how close a synthesized circuit unitary is to the target unitary. It accounts for global phase, measuring if two unitaries are physically identical.
- Graph Factorization
- This technique is used to choose CNOT arrangements within layers. For example, using a one-factorization of the complete graph ensures every qubit gets connected to every other qubit as quickly as possible, maximizing mixing.
Terminology
Summary
Summary
The paper investigates the problem of unitary synthesis: decomposing a unitary operator, given as a full 2 n times 2 n matrix, into a quantum circuit composed of one-qubit and two-qubit gates from a continuous gate set. The authors focus on the generic case, where a unitary has 4 n - 1 real parameters and thus requires circuits of maximal size, in contrast to compiled unitaries that arise from programming and typically have short circuits due to structure or symmetry.
The central claim of the paper is that simple gradient descent reliably finds depth- and gate-optimal circuits for generic unitaries, including in the presence of restricted chip connectivity.
This runs counter to earlier evidence suggesting that optimal synthesis required combinatorial search. The authors explain the discrepancy by showing that failures in prior work can be attributed to the random selection of certain parameter-deficient circuit skeletons.
The method parameterizes the circuit as U circ = S T-1 S 2 T 1 S 1, where each S i is a tensor product of single-qubit unitaries and each T i is a set of simultaneous CNOT gates. Each single-qubit unitary is parameterized by three Euler angles: U j(theta 1, theta 2, theta 3) = R z(theta 2)R y(theta 1)R z(theta 3). The pattern of CNOTs is called the circuit skeleton
and is held constant during gradient descent. The cost function is the trace distance C = N - abs(Tr(D)), where D = U goal U circ, and convergence is identified when C at most 10-8. The optimization uses simple gradient descent without momentum, updating parameters sequentially, and is accelerated by an SVD-based step that finds the closest unitary to the local subsystem, which is mathematically equivalent to many steps of gradient descent.
A key contribution is the parameter counting analysis. A circuit with layers has P = (2 + 1)n real parameters, and to express a generic unitary one requires = (4 n - 1 - n)/(2n). The authors also explain that each CNOT loses two effective parameters due to its symmetries (invariance under R z on the control and R x on the target), which can be understood from the degeneracy of the CNOT spectrum-1, 1, 1, 1. They note that a generic two-qubit gate (like Sycamore) has no degeneracies and loses no parameters, while SWAP loses six parameters.
The primary innovation is the choice of circuit skeleton. For two-qubit systems, the unique three-layer topology is used. For four-qubit systems, the authors use a three-layer motif that connects all qubits: (1,2),(3,4); (1,3),(2,4); (1,4),(2,3), repeated until = 32 layers. For six-qubit systems, they use the 1-factorization of a six-node graph, which gives five distinct pairings: (1,2),(3,4),(5,6); (1,4),(2,5),(3,6); (1,6),(2,4),(3,5); (1,3),(2,6),(4,5); (1,5),(2,3),(4,6), repeated cyclically until = 341 layers. The authors emphasize that avoiding repeated CNOT pairings in consecutive layers is crucial to prevent effective underparameterization, where symmetries reduce the number of effective degrees of freedom.
The numerical results show that the method converges reliably for all trials: approximately 200 two-qubit, 100 four-qubit, and 30 six-qubit unitaries, all generated Haar-randomly. The method works regardless of initialization, as shown by running the same target unitary with five different random parameter sets. The convergence behavior is consistent across system sizes, as detailed in the appendices.
The paper also investigates underparameterized circuits, where the number of layers is slightly below the required minimum. In these cases, the cost function plateaus at approximately 10-3, far from the desired precision of 10-8, even when the deficit is small. The authors conclude that underparameterization is not useful. They also note that slightly over-parameterized circuits converge faster than adequately parameterized ones. The authors attempted several modifications to allow topology changes during optimization (e.g., swapping CNOT layers, simulated annealing, trying all possible changes), but none provided noticeable improvement over simple gradient descent.
The method is extended to restricted connectivity, using two representative sub-systems of a 127-qubit IBM chip. In the first case (qubits 3,4,5,15), qubit 4 can couple to only one of 3, 5, or 15 at a time, and the others are not connected to each other, requiring = 64 layers. In the second case (qubits 0,1,2,3), only adjacent qubits can be connected, requiring = 42 layers. In both cases, the method converges reliably with adequate parameterization, while underparameterized circuits plateau. The authors conclude that the method works even under connectivity constraints, making it suitable for realistic hardware.
The paper also provides a theoretical explanation for the failure probability in random circuits observed in prior work. For a three-qubit circuit with N = 14 CNOT gates, any triple repeat of the same CNOT pairing leads to underparameterization, giving a success rate of approximately 31.9%. For N = 15, allowing at most one triple repeat gives approximately 69.98%, and for N = 16, approximately 86.7%. These numbers agree well with the results reported in [3]. For larger systems, the authors find excellent agreement with theory for n = 4 and n = 5.
The paper concludes that Optimization via gradient descent has been found to converge reliably as long as there is adequate parameterization.
The choice of CNOT configuration becomes increasingly important for larger systems, as symmetries between layers can reduce the effective number of parameters. The method remains robust even under limited connectivity, making it particularly well-suited for realistic quantum hardware. The authors conjecture that the resulting loss landscape has no local minima—that is, no locally optimal circuit parameterization with fidelity less than 1.
Improvements for AI systems
Based on the paper, I can identify several concrete improvements to AI systems, particularly in the areas of quantum circuit synthesis, optimization, and combinatorial search.
1. Improved Unitary Synthesis via Topology-Aware Gradient Descent
-
Improvement: Replace random or brute-force circuit skeleton selection with the paper's deterministic
1-factorization
topology (e.g., for 6 qubits, use the 5 specific CNOT pairings listed in Section 4.1). This eliminates the need for combinatorial search over CNOT arrangements. -
What the improved AI can do: Given any generic unitary matrix (up to 6+ qubits), the AI can reliably synthesize a depth- and gate-optimal circuit in a single gradient descent run, with 100% success rate (vs. near-zero for random skeletons at larger n). It will never get stuck in local minima caused by parameter-deficient skeletons.
2. Accelerated Optimization via SVD-Based Manifold-Aware Updates
-
Improvement: Replace standard gradient descent parameter updates with the paper's SVD-based
closest unitary
projection (Section 3.2.1). This avoids learning-rate tuning and speeds convergence by directly jumping to the optimal single-qubit rotation at each site. -
What the improved AI can do: Optimize circuits 10–100× faster (empirically) while maintaining the same convergence guarantees. It eliminates the need for hyperparameter search, making it robust across different hardware topologies (fully connected, 1D chain, star topology).
3. Robust Underparameterization Detection and Early Stopping
-
Improvement: Use the paper's parameter-counting formula (Section 3.2.2) to pre-check if a given circuit skeleton has sufficient effective parameters (accounting for CNOT symmetries). If not, the AI can immediately reject the skeleton or add layers before running expensive optimization.
-
What the improved AI can do: Avoid wasting compute on doomed optimizations. It can predict (with 99% accuracy, matching the paper's failure-rate calculations in Appendix D) whether a circuit will converge, and automatically adjust layer count or topology to guarantee success.
4. Connectivity-Constrained Synthesis Without Loss of Optimality
-
Improvement: Apply the same gradient descent method to arbitrary hardware graphs (e.g., IBM's 127-qubit chip subsets), using the paper's layer-count adjustment (e.g., 64 layers for a 4-qubit star topology instead of 32). The AI should not attempt to
fix
connectivity via SWAP insertion, but rather re-parameterize the circuit directly on the available edges. -
What the improved AI can do: Synthesize optimal circuits for real quantum hardware with restricted connectivity, achieving the same fidelity (10−8) as fully connected cases, with no extra CNOT overhead. This is a direct drop-in replacement for Qiskit's transpiler for generic unitaries.
5. Failure Prediction for Random Combinatorial Search
-
Improvement: Implement the paper's analytical model (Appendix D) to compute the exact probability of success for any given random CNOT sequence, based on counting
triple repeats
orparameter-deficient blocks.
This can be used as a prior for any RL or MIP-based synthesis approach. -
What the improved AI can do: Before running a search, it can estimate the likelihood of finding a valid circuit. For n=4, it can predict success rates of 95% (67+ CNOTs), matching empirical results. This allows the AI to allocate search effort more efficiently.
6. Overparameterization as a Convergence Accelerator
-
Improvement: When speed is critical, deliberately add 1–2 extra layers beyond the theoretical minimum (as shown in Appendix B, overparameterized circuits converge faster than exactly-parameterized ones). The AI can then post-process to remove redundant gates.
-
What the improved AI can do: Trade a small increase in circuit depth for a significant reduction in optimization time (e.g., 2–3× faster convergence for 4-qubit systems with l=33 vs. l=32), while still achieving the same final fidelity.
7. General-Purpose Loss Landscape Analysis for Non-Convex Optimization
-
Improvement: Apply the paper's insight—that local minima vanish when the parameterization is
complete
(no symmetries reducing effective degrees of freedom)—to other AI optimization tasks (e.g., neural network training, tensor network contraction). The AI can check forparameter degeneracies
in its model architecture and fix them. -
What the improved AI can do: For any differentiable model, it can diagnose whether the loss landscape has spurious local minima by counting effective parameters (accounting for symmetries). If underparameterized, it can automatically add parameters or break symmetries to guarantee convergence to a global optimum (for generic targets).
Related papers
- Reconquering Bell sampling on qudits: stabilizer learning and testing, quantum pseudorandomness bounds, and more
- Encrypted clones can leak: Classification of informative subsets in Quantum Encrypted Cloning
- Polynomial-time classical and quantum simulation of quantum impurity models
- Theory of quantum-enhanced interferometry with general Markovian light sources
- A convergent hierarchy of spectral gap certificates for qubit Hamiltonians
- Universal Bound and Phase Transition in Many-Body Fermionic Non-Gaussianity