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

Fix the Native Simulator to Expose the Fixed-Size Types. #631

@kuzminrobin

Description

@kuzminrobin

The Native Simulator is compiled (to a dynamic library) with g++ on WSL, and presumably with MSVC++ on Win.
Our QIR wrappers around it, e.g. CFullstateSimulator in QIR Runtime, are compiled with a different compiler - clang.

The Native Simulator dynamic library exposes its API using the built-in types like unsigned, bool, double, etc. The size of such types can be different in different compilers, which can cause problems when crossing the dynamic library boundary (see more details here, search for "Datatype size".)

Consider replacing all the built-in types with the fixed-size types, like uint32_t, uint8_t, <to do: fixed-size type for double>.
Example of a problem.

See related #630, #592.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceImprove codebase quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions