QuTech-Delft / libqasm

libQASM: Library to parse cQASM files
https://arxiv.org/abs/1805.09607
Other
17 stars 16 forks source link

Allow multiple qubit/bit (register) definitions and mid-circuit measurements #223

Closed rturrado closed 4 months ago

rturrado commented 5 months ago

A program must have a version, then can optionally have statements. Statements can be variable definitions or instructions. Instructions can be gates or measure instructions.

Also: generate_antlr_parser.py: fix shutil.move when destination file exists.

rturrado commented 4 months ago

All looks good.

The res/v3x/parsing contains all these test inputs and golden files. Is it necessary to do the testing this way? Maybe not something to refactor now, but wouldn't it be better to not have this being file-based?

Thanks, @elenbaasc.

Yes, indeed.

Basically, the idea is to move away, not completely, but limit those file-based integration tests to a minimum, and do more unit-testing.

But, since I already had those tests, I'm basically recovering them from the backup and putting them back on again.