```@meta
CollapsedDocStrings = true
```

# [API](@id API)

```@contents
Pages = ["API.md"]
Depth = 2:3
```

## [Hilbert Spaces](@id API: Hilbert Spaces)

```@docs
SecondQuantizedAlgebra.HilbertSpace
```

```@docs
ProductSpace
```

```@docs
FockSpace
```

```@docs
NLevelSpace
```

```@docs
SecondQuantizedAlgebra.CollectiveNLevelSpace
```

```@docs
PauliSpace
```

```@docs
SpinSpace
```

```@docs
PhaseSpace
```

```@docs
⊗
```

```@docs
tensor
```

## [q-Numbers](@id API: Operators)

```@docs
SecondQuantizedAlgebra.QField
```

```@docs
SecondQuantizedAlgebra.QSym
```

```@docs
SecondQuantizedAlgebra.QAdd
```

```@docs
SecondQuantizedAlgebra.QTerm
```

```@docs
SecondQuantizedAlgebra.QTermDict
```

```@docs
SecondQuantizedAlgebra.Op
```

```@docs
SecondQuantizedAlgebra.OpKind
```

```@docs
SecondQuantizedAlgebra.prefactor
SecondQuantizedAlgebra.operators
SecondQuantizedAlgebra.sorted_arguments
SecondQuantizedAlgebra.constraint_pairs
```

```@docs
SecondQuantizedAlgebra.normal_order
SecondQuantizedAlgebra.qadjoint
SecondQuantizedAlgebra.inner_adjoint
SecondQuantizedAlgebra.symmetric_to_normal
SecondQuantizedAlgebra.normal_to_symmetric
SecondQuantizedAlgebra.expand_completeness
SecondQuantizedAlgebra.anticommutator
SecondQuantizedAlgebra.is_average
SecondQuantizedAlgebra.is_indexed_sum
SecondQuantizedAlgebra.undo_average
SymbolicUtils.substitute
SymbolicUtils.simplify
SymbolicUtils.expand
```

```@docs
@qnumbers
```

```@docs
Destroy
```

```@docs
Create
```

```@docs
Transition
```

```@docs
SecondQuantizedAlgebra.CollectiveTransition
```

```@docs
Pauli
```

```@docs
Spin
```

```@docs
Position
```

```@docs
Momentum
```

```@docs
SecondQuantizedAlgebra.optype
SecondQuantizedAlgebra.operator_name
SecondQuantizedAlgebra.operator_index
SecondQuantizedAlgebra.is_destroy
SecondQuantizedAlgebra.is_create
SecondQuantizedAlgebra.is_transition
SecondQuantizedAlgebra.is_collective_transition
SecondQuantizedAlgebra.is_pauli
SecondQuantizedAlgebra.is_spin
SecondQuantizedAlgebra.is_position
SecondQuantizedAlgebra.is_momentum
```

## [Mean field](@id API: Meanfield)

```@docs
meanfield
```

```@docs
commutator
```

```@docs
acts_on
```

```@docs
AbstractMeanfieldEquations
```

```@docs
MeanfieldEquations
```

## [Average](@id API: Average)

```@docs
average
```

```@docs
cumulant_expansion
```

```@docs
cumulant
```

```@docs
get_order
```

## [Introspection](@id API: Introspection)

```@docs
states
```

```@docs
moments
```

```@docs
moment_variable_map
```

```@docs
closure_report
```

```@docs
noise_channels
```

## [Correlation functions](@id API: correlation)

```@docs
CorrelationFunction
```

```@docs
ModelingToolkitBase.System
```

```@docs
Spectrum
```

```@docs
correlation_u0
```

```@docs
correlation_p0
```

## [Symbolic Summations](@id API: Sums)

```@docs
Index
```

```@docs
IndexedOperator
```

```@docs
IndexedVariable
```

```@docs
DoubleIndexedVariable
```

```@docs
Σ
```

```@docs
change_index
```

```@docs
get_indices
SecondQuantizedAlgebra.has_index
SecondQuantizedAlgebra.assume_distinct_index
SecondQuantizedAlgebra.index_slot
SecondQuantizedAlgebra.index_range
SecondQuantizedAlgebra.index_name
SecondQuantizedAlgebra.index_sym
SecondQuantizedAlgebra.get_sum_indices
SecondQuantizedAlgebra.get_sum_non_equal
SecondQuantizedAlgebra.has_sum_metadata
```

```@docs
evaluate
```

```@docs
scale
```

```@docs
scale!
```

## [Measurement Backaction](@id API: Measurement Backaction)

```@docs
NoiseMeanfieldEquations
```

```@docs
QuantumCumulants.translate_W_to_Y
```

```@docs
EvolutionDirection
```

```@docs
Forward
```

```@docs
Backward
```

## [Utility functions](@id API: Utils)

```@docs
find_missing
```

```@docs
find_operators
```

```@docs
complete
```

```@docs
complete!
```

```@docs
unique_ops
SecondQuantizedAlgebra.unique_ops!
```

```@docs
QuantumCumulants.simplify!
```

```@docs
fundamental_operators
```

```@docs
to_numeric
```

```@docs
numeric_average
```

```@docs
initial_values
```

```@docs
get_solution
```

```@docs
parameter_map
```

```@docs
modify_equations
```

```@docs
modify_equations!
```

```@docs
substitute!
```

```@docs
SecondQuantizedAlgebra.make_time_dependent
```

## [Numeric backends](@id API: Numeric backends)

Symbolic-to-numeric conversion ([`to_numeric`](@ref), [`numeric_average`](@ref),
[`initial_values`](@ref)) runs through SecondQuantizedAlgebra's pluggable backend
interface. Loading a backend (`using QuantumOpticsBase` or `using QuantumToolbox`) selects
the concrete implementation; the conversion details are documented in SQA's
[numeric conversion section](https://qojulia.github.io/SecondQuantizedAlgebra.jl/stable/implementation/#Numeric-conversion).
The re-exported types and hooks below are the interface for selecting and implementing a
backend.

```@docs
NumericBackend
QuantumOpticsBackend
QuantumToolboxBackend
numeric_backend
numeric_basis
numeric_subbasis
numeric_operator
numeric_identity
numeric_embed
numeric_num_subsystems
numeric_assemble
numeric_assemble_td
numeric_materialize
numeric_expect
```
