# [Full API](@id Full-API)

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

## States

Stabilizer states can be represented with the [`Stabilizer`](@ref), [`Destabilizer`](@ref), [`MixedStabilizer`](@ref), and [`MixedDestabilizer`](@ref) tableau data structures. You probably want to use [`MixedDestabilizer`](@ref) which supports the widest set of operations.

Moreover, a [`MixedDestabilizer`](@ref) can be stored inside a [`Register`](@ref) together with a set of classical bits in which measurement results can be written.

Lastly, for Pauli frame simulations there is the [`PauliFrame`](@ref) type, a tableau in which each row represents a different Pauli frame.

There are [convenience constructors for common types of states and operators](@ref Useful-States-and-Operators).

For non-Clifford simulations, two state types (for two related algorithms) are available:
- [`GeneralizedStabilizer`](@ref): a weighted sum of projectors on stabilizer states that supports arbitrary (non-unitary) Pauli channels like [`PauliChannel`](@ref) and [`UnitaryPauliChannel`](@ref). Use with [`mctrajectory!`](@ref), [`apply!`](@ref), [`expect`](@ref), [`projectrand!`](@ref).
- [`PureGeneralizedStabilizer`](@ref): a pure-state variant that supports the non-Clifford gates [`sT`](@ref) and [`sCCZ`](@ref), but has limitations with respect to measurement operations. Use with [`mctrajectory!`](@ref), [`apply!`](@ref), and in particular with [`emtrajectories`](@ref) for end-of-circuit Z-basis measurements (no mid-circuit measurements).

## Operations

Acting on quantum states can be performed either:

- In a "linear algebra" language where unitaries, measurements, and other operations have separate interfaces. This is an explicitly deterministic lower-level interface, which provides a great deal of control over how tableaux are manipulated. See the [Stabilizer Tableau Algebra Manual](@ref Stabilizer-Tableau-Algebra-Manual) as a primer on these approaches.
- Or in a "circuit" language, where the operators (and measurements and noise) are represented as circuit gates. This is a higher-level interface in which the outcome of an operation can be stochastic. The API for it is centered around the `apply!` function. Particularly useful for [Monte Carlo simulations](@ref noisycircuits_mc) (with [`mctrajectories`](@ref)) and [Perturbative Expansion Symbolic Results](@ref noisycircuits_perturb) (with [`petrajectories`](@ref)). For Clifford-only circuits, [`pftrajectories`](@ref) provides fast Pauli frame simulation. For circuits with non-Clifford gates or non-unitary Pauli Channels you can use [`mctrajectory!`](@ref) directly (with an appropriate state data type) or [`emtrajectories`](@ref) which samples end-of-circuit Z-basis measurements using the sum-over-Cliffords method.

See the [full list of operations](@ref all-operations) for a list of implemented operations.

## Autogenerated API list

```@autodocs
Modules = [QuantumClifford, QuantumClifford.GraphSim, QuantumClifford.PauliChannelNonClifford, QuantumClifford.PureNonClifford]
Private = false
```

## Private API

!!! danger "Private Implementation Details"
    These functions are used internally by the library and might be drastically modified or deleted without warning or deprecation.

```@autodocs
Modules = [QuantumClifford, QuantumClifford.GraphSim, QuantumClifford.PauliChannelNonClifford, QuantumClifford.PureNonClifford]
Private = true
Public = false
```
