Skip to content

Creating an explicit namespace with the same name as a callable breaks Python interop #2771

@swernli

Description

@swernli

From the Q# side, defining an explicit namespace in a cell with the same name as an earlier callable works because the two different entities are differentiable by type. But in Python interop, they try to occupy the same entity under qsharp.code and end up breaking the interop mechanisms:

Image

We should decide what the Q# behavior and the Python interop expectation is in this situation. Does the later defined instance shadow the first? Should Q# disallow this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions