# formula

**Installation Required:** This functionality requires MATLAB Support Package for Quantum Computing.

## Description

`[`

additionally returns the basis states a string vector and the amplitudes as a numeric
vector, both of which are used to form the output formula of the quantum state.`str`

,`states`

,`amplitudes`

] = formula(`s`

)

`___ = formula(`

specifies options using one or more name-value arguments. You can use this syntax with any
of the output argument combinations in the previous syntaxes.`s`

,`Name=Value`

)

For example, you can choose the basis in which to represent each qubit by using
`formula(s,Basis=basis)`

. You can also specify a probability threshold to
include states in the output by using `formula(s,Threshold=thr)`

.

## Examples

## Input Arguments

## Output Arguments

## Version History

**Introduced in R2023a**