Skip to content

Change basis from char to enum #476

Open
@Naphann

Description

@Naphann

Currently, in the interface of qubit we refer to measurement basis using char. This can lead to hard to detect error when changing code. If the developer put a wrong char, it could be hard to debug.

Suggestion is to use enum instead of char.

struct MeasurementOutcome {
char basis;
bool outcome_is_plus;
char GOD_clean;
bool operator==(const MeasurementOutcome &outcome) const { return basis == outcome.basis && outcome_is_plus == outcome.outcome_is_plus && GOD_clean == outcome.GOD_clean; }
};

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions