Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Documentation generation tool not resolving namespaces correctly in # See Also blocks. #267

Open
@cgranade

Description

@cgranade

Describe the bug

When generating documentation for /// # See Also blocks, the Q# compiler currently does not resolve identifier names for operations, functions and UDTs to their fully-qualified names. See microsoft/QuantumLibraries#190 for an example.

To Reproduce

Generate documentation for an operation in the Microsoft.Quantum.Arithmetic namespace and with the following comment:

/// # Summary
/// Performs a modular increment of a qubit register by an integer constant.
///
/// Let us denote `increment` by a, `modulus` by N and integer encoded in `target` by y.
/// Then the operation performs the following transformation:
/// \begin{align}
///     \ket{y} \mapsto \ket{(y + a) \operatorname{mod} N}
/// \end{align}
/// Integers are encoded in little-endian format.
///
/// # Input
/// ## increment
/// Integer increment a to be added to y.
/// ## modulus
/// Integer N that mods y + a.
/// ## target
/// Integer y in `LittleEndian` format that `increment` a is added to.
///
/// # See Also
/// - IncrementPhaseByModularInteger
///
/// # Remarks
/// Assumes that the initial value of target is less than N
/// and that the increment a is less than N. 
/// Note that
/// <xref:microsoft.quantum.arithmetic.incrementphasebymodularinteger> implements
/// the same operation in the `PhaseLittleEndian` basis.
operation IncrementByModularInteger(increment : Int, modulus : Int, target : LittleEndian) : Unit {

Expected behavior

Expected that the above would typeset the same as replacing the # See Also block with:

/// # See Also
/// - Microsoft.Quantum.Arithmetic.IncrementPhaseByModularInteger

Screenshots

Actual rendering:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: editorExtensions for Visual Studio and Visual Studio CodedocumentationImprovements or additions to documentationstatus: deferredWork is deferred until a later time

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions