# [Predefined Quantum Circuits](@id Predefined-Quantum-Circuits)

```@raw html
<style>
    .content table td {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
</style>
```

The submodule `QuantumSavory.CircuitZoo` provides reusable common quantum
circuits.

## What CircuitZoo Is For

`CircuitZoo` collects local quantum routines that appear often in communication
and networking models, such as swapping, purification, and fusion.

These are not full protocols. They do not wait on messages, schedule retries,
or manage resources over time. They are callable circuit objects that operate
on already chosen register slots.

That distinction matters:

- use `CircuitZoo` when you want reusable quantum logic;
- use `ProtocolZoo` when you want reusable discrete-event control logic.

## Common Usage Pattern

Most entries are small callable structs.

```julia
circuit = Purify3to1(:Z, :Y)
success = circuit(a[1], b[1], a[2], a[3], b[2], b[3])
```

This style is useful because a protocol can depend on a circuit by intent
instead of re-implementing the same gate pattern inline.

## Typical Families

The current `CircuitZoo` mainly covers:

- entanglement swapping,
- purification routines,
- graph-state fusion, and
- related node-local subcircuits.

The autodocs below are the exact API reference.

## Autogenerated API list for `QuantumSavory.CircuitZoo`

```@autodocs
Modules = [QuantumSavory.CircuitZoo]
Private = false
```
