MicrosoftDocs/quantum-docs-pr

Empty Tuple Code Sample in Entanglement Tutorial

kchatr opened this issue · 3 comments

While explaining the Unit keyword, it made a reference to an empty tuple in Python which was followed by this code sample:
(Tuple[()]). However, this is incorrect, as an empty tuple can be initialized by either tuple() or tuple([]), but not Tuple[()]

This is a relatively minor issue, but considering the nature of the documentation and rigour of the material, I feel like this is a valid albeit inconsequential issue.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Oh, good catch! Thanks @kchatr, I'll create a PR to fix it.

Oh, good catch! Thanks @kchatr, I'll create a PR to fix it.

As a clarification, Tuple[()] is the type hint for the value tuple([]).

Oh, my bad @cgranade. Tbh, this is the first time I hear about "type hints". Cool that something like that exists!