qdk icon indicating copy to clipboard operation
qdk copied to clipboard

OpenQASM Active Issues

Open idavis opened this issue 7 months ago • 2 comments

  • [ ] Implicit casting is too lenient compiling more programs that 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

idavis avatar May 22 '25 20:05 idavis

It looks like you don't currently support bit-level indexing into types like int, uint, angle, etc. The relevant part of the OpenQASM spec is here: https://openqasm.com/language/types.html#classical-value-bit-slicing

blakejohnson avatar May 28 '25 16:05 blakejohnson

@blakejohnson I'll create another tracking issue for missing language features. We were only tracking bugs here, but we need to show what language parts we haven't implemented.

idavis avatar May 28 '25 16:05 idavis