# Microsoft.Quantum.Preparation namespace

This namespace contains functions and operations for preparing qubits into arbitrary initial states.

## Operations

Name | Summary |
---|---|

ApproximatelyPrepareArbitraryState | > [!WARNING] |

ApproximatelyPrepareArbitraryStateCP | Given a set of coefficients and a little-endian encoded quantum register, prepares an state on that register described by the given coefficients, up to a given approximation tolerance. |

ApproximatelyPrepareArbitraryStateD | Given a set of coefficients and a little-endian encoded quantum register, prepares an state on that register described by the given coefficients, up to a given approximation tolerance. |

PrepareArbitraryState | > [!WARNING] |

PrepareArbitraryStateCP | Given a set of coefficients and a little-endian encoded quantum register, prepares an state on that register described by the given coefficients. |

PrepareArbitraryStateD | Given a set of coefficients and a little-endian encoded quantum register, prepares an state on that register described by the given coefficients. |

PrepareChoiState | Prepares the Choi–Jamiołkowski state for a given operation onto given reference and target registers. |

PrepareChoiStateA | Prepares the Choi–Jamiołkowski state for a given operation with an adjoint variant onto given reference and target registers. |

PrepareChoiStateC | Prepares the Choi–Jamiołkowski state for a given operation with a controlled variant onto given reference and target registers. |

PrepareChoiStateCA | Prepares the Choi–Jamiołkowski state for a given operation with both controlled and adjoint variants onto given reference and target registers. |

PrepareEntangledState | Pairwise entangles two qubit registers. |

PrepareIdentity | Given a register, prepares that register in the maximally mixed state. |

PreparePauliEigenstate | Prepares a qubit in the positive eigenstate of a given Pauli operator. If the identity operator is given, then the qubit is prepared in the maximally mixed state. |

PrepareQubit | > [!WARNING] |

PrepareSingleQubitIdentity | Prepares a qubit in the maximally mixed state. |

PrepareUniformSuperposition | Creates a uniform superposition over states that encode 0 through `nIndices - 1` . |

_PrepareAmplitudesFromZeroState | Given a set of coefficients and a little-endian encoded quantum register of unentangled qubits, all of which are in zero state, prepares a state on that register described by the given coefficients. Uses state emulation if supported by the target. |

## Functions

Name | Summary |
---|---|

BlochSphereCoordinates | Computes the Bloch sphere coordinates for a single-qubit state. |

PurifiedMixedState | Returns an operation that prepares a a purification of a given mixed state. |

PurifiedMixedStateRequirements | Returns the total number of qubits that must be allocated in order to apply the operation returned by PurifiedMixedState function. |

PurifiedMixedStateWithData | Returns an operation that prepares a a purification of a given mixed |

QuantumROM | > [!WARNING] |

QuantumROMQubitCount | > [!WARNING] |

StatePreparationComplexCoefficients | > [!WARNING] |

StatePreparationPositiveCoefficients | > [!WARNING] |

_CompileApproximateArbitraryStatePreparation | |

_QuantumROMDiscretization |

## User-defined types

Name | Summary |
---|---|

MixedStatePreparation | Represents a particular mixed state that can be prepared on an index and a garbage register. |

MixedStatePreparationRequirements | Represents the number of qubits required in order to prepare a given mixed state. |

## Feedback

Submit and view feedback for