> For the complete documentation index, see [llms.txt](https://docs.quantaria.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quantaria.xyz/deep-dives/cayley-unitary-adapters.md).

# The Cayley transform and unitary adapters

A unitary matrix preserves norms, which is what a quantum gate must do. Keeping a trained matrix unitary during gradient descent is hard. The Cayley transform is one way to parameterize unitaries so that training stays on the unitary manifold. This page explains the method.

## Unitary matrices

A matrix U is unitary if U†U = I. Quantum gates are unitary, and so are the adapters Quantaria's Dirac line plans to use.

## The transform

For any skew-Hermitian matrix A (A† = −A), the matrix

U = (I − A)(I + A)⁻¹

is unitary. The map from A to U is the Cayley transform. Because A can be any skew-Hermitian matrix, training A with ordinary gradient steps keeps U unitary without any projection step.

## Why this helps

Without a parameterization like this, gradient steps push the matrix off the unitary manifold, and an extra step is needed to bring it back. The Cayley form removes that step.

## Limits

* Inverting I + A has a cost, and the inversion can be ill-conditioned for some A.
* A unitary adapter only preserves norms. It does not by itself make a layer useful. The training task still decides what the adapter learns.

## Quantaria's use

The Dirac line plans Cayley-parameterized unitary adapters at the boundary between circuit and tensor-network sections. The published work reports that they lowered perplexity by up to 1.6% in one setting ([arXiv:2410.17397](https://arxiv.org/abs/2410.17397)). That is the paper's result, not a Quantaria measurement. See [Quantum Path](https://github.com/bhavy2908/dataai_docs/tree/main/architecture/quantum-path.md).

## Related

* [MERA and disentanglers](/deep-dives/mera-and-disentanglers.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.quantaria.xyz/deep-dives/cayley-unitary-adapters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
