QECC doc comments
This commit is contained in:
Родитель
5254f993d4
Коммит
7538bea40f
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
|
||||
|
@ -11,6 +11,7 @@ namespace Microsoft.Quantum.Canon
|
|||
|
||||
/// # Summary
|
||||
/// Syndrome measurement and the inverse of embedding.
|
||||
///
|
||||
/// $X$- and $Z$-stabilizers are not treated equally,
|
||||
/// which is due to the particular choice of the encoding circuit.
|
||||
/// This asymmetry leads to a different syndrome extraction routine.
|
||||
|
@ -25,11 +26,13 @@ namespace Microsoft.Quantum.Canon
|
|||
/// would have caused the measured syndrome.
|
||||
///
|
||||
/// # Remarks
|
||||
///
|
||||
/// > [!WARNING]
|
||||
/// > This routine is tailored
|
||||
/// > to a particular encoding circuit for Steane's 7 qubit code;
|
||||
/// > if the encoding circuit is modified then the syndrome outcome
|
||||
/// > might have to be interpreted differently.
|
||||
///
|
||||
operation _ExtractLogicalQubitFromSteaneCode (code : LogicalRegister) : (Qubit, Int, Int)
|
||||
{
|
||||
Adjoint SteaneCodeEncoderImpl((code!)[0 .. 0], (code!)[1 .. 6]);
|
||||
|
@ -86,7 +89,9 @@ namespace Microsoft.Quantum.Canon
|
|||
|
||||
|
||||
/// # Summary
|
||||
/// Performs a $\pi / 4$ rotation about $Y$ by consuming a magic
|
||||
/// Performs a π/4 rotation about `Y`.
|
||||
///
|
||||
/// The rotation is performed by consuming a magic
|
||||
/// state; that is, a copy of the state
|
||||
/// $$
|
||||
/// \begin{align}
|
||||
|
@ -104,11 +109,12 @@ namespace Microsoft.Quantum.Canon
|
|||
///
|
||||
/// # Remarks
|
||||
/// The following are equivalent:
|
||||
/// ```Q#
|
||||
/// ```qsharp
|
||||
/// Ry(PI() / 4.0, data);
|
||||
///
|
||||
/// using (magicRegister = Qubit[1]) {
|
||||
/// let magic = magicRegister[0];
|
||||
/// ```
|
||||
/// and
|
||||
/// ```qsharp
|
||||
/// using (magic = Qubit()) {
|
||||
/// Ry(PI() / 4.0, magic);
|
||||
/// InjectPi4YRotation(data, magic);
|
||||
/// Reset(magic);
|
||||
|
@ -159,6 +165,8 @@ namespace Microsoft.Quantum.Canon
|
|||
|
||||
|
||||
/// # Summary
|
||||
/// Implements the Knill magic state distillation algorithm.
|
||||
///
|
||||
/// Given 15 approximate copies of a magic state
|
||||
/// $$
|
||||
/// \begin{align}
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace Microsoft.Quantum.Canon
|
|||
/// # Summary
|
||||
/// Represents a Calderbank–Shor–Steane (CSS) code as defined by
|
||||
/// its encoder, decoder, and its syndrome measurement procedures
|
||||
/// for $X$ and $Z$ errors, respectively.
|
||||
/// for `X` and `Z` errors, respectively.
|
||||
newtype CSS = (EncodeOp, DecodeOp, SyndromeMeasOp, SyndromeMeasOp);
|
||||
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ namespace Microsoft.Quantum.Canon
|
|||
/// # Summary
|
||||
/// Given an array of results, represents the array by a single
|
||||
/// integer, with the 0th (leftmost) entry in the array being mapped
|
||||
/// the least significant bit. Thus, [One, Zero] is represented by
|
||||
/// 1 and [Zero, One] by 2.
|
||||
/// the least significant bit. Thus, `[One, Zero]` is represented by
|
||||
/// 1 and `[Zero, One]` by 2.
|
||||
function ResultAsInt (results : Result[]) : Int
|
||||
{
|
||||
mutable n = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче