microsoft / microsoft/qdk

OpenQASM Active Issues

Open
#2,451 2 comments 0 reactions 0 assignees View on GitHub
bug needs triage
Dominant language
Rust
Stars
1k
Forks
212
Avg merge
3d 8h
Merged PRs (30d)
65

Description

- [ ] Implicit casting is too lenient compiling more programs than technically allowed
- [x] Type checking for register concatenation is too strict (incorrect).
- [x] Better user guidance on failure to capture non-const symbols in OpenQASM #2653
- [x] `OPENQASM` statements don't validate version correctly. Likely need to update parser to return `Err(None)` instead of `Ok(None)` #2650
- [x] Specifying a gate name immediately followed by a `;` does not cause an error and the gate call is ignored (`h;` for example). #2625
- [x] For common symbol resolution errors that would be solved by including `"stdgates.inc"`, create an error variant with help text letting the user know. #2625
- [x] Mutable array refs can't be used in indexed assignment expressions #2616
- [x] Slicing endianess for classical values isn't handled correctly #2600
- [x] annotation parsing should properly use namespaced idents. #2594
- [x] pragma parsing should properly use namespaced idents. #2571
- [x] When parsing arrays as reference using the `array[T, #dim = n]` syntax, we should use a different AST struct instead of storing the `n` as the length of the first dimension. #2557
- [x] "timing literals are not supported" error has incorrect span. #2559
- [x] Trying to include an external file has its error location incorrectly set to the top of the file #2512
- [x] When an include isn't found, the error span is incorrect. #2512
- [x] Function types in errors are not pretty printed. Like when when trying to cast a def to an int. #2508
- [x] `gate` is not highlighted as a keyword. #2459
- [x] For copilot instructions, see if we can tell copilot to give a preamble when creating openqasm files to help avoid common issues such as undefined gates. #2462

Contributor guide

Open the contributing guide

Research direction

The remaining unchecked item is that implicit casting in OpenQASM compilation is too lenient. No file, test, or entry point is identified, so first locate the relevant OpenQASM compiler and its type-checking tests. Done means programs with technically disallowed implicit casts are rejected, with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.