Week Highlights
- Updates on PR #295: Discussions taken up at TSC Meeting session on Abeers comments and questions.
- Discussion with Tom Alexander for an Openpulse grammar implementation. PR #296 opened up.
- Jacks meeting and discussion with
- Presentation at IEEE Quantum Week Qiskit Advocate session
- Last week’s TODO list achieved:
- BaseBitArray: List[Optional[bool]] ——–> Optional[str] - pushed to repo
- BaseBitArray.value returns int - pushed to repo
- BaseBitArray bitwise operations implementation (including rotr, rotl, popcount )- pushed to repo
- Logical and comparison operations (
&&
,||
,==
,!=
, etc) overloading - pushed to repo - Duration: Casting to ‘machine-precision’ float (tentative: just use python float) - pushed to repo - pushed to repo
- Summary of Abeers Chat with Jake Lishman:
- The ComplexNumber : RealNumber PlusMinus ImagNumber is a lexer rule, not a parser rule as it starts with a capital letter (didn’t know this earlier).
- Adding a separate rule to parse complex numbers differently (let’s say it is complexExpression) might create problems with the parsing as there will be a conflict with additiveExpression and complexExpression , and that doesn’t seem like a right choice to have.
- Parsing complex numbers as additiveExpression has an advantage as it can parse things like 2*3.0 + sin(pi/2)imag successfully, which is a valid thing according to spec, but will be difficult to implement with complexExpression type parsing rule.
- Literals for complex numbers ar- e probably not allowed as there has been no discussion about it anywhere. Example (3+4im) * (1+2im) is an invalid statement (with or without type-casting) because complex[.] type doesn’t support literals and implicit typing/casting, and we have to explicitly write the below code:
- Added to openpulse group on qiskit slack for further discussions and assistance on PR #296.
- Abeers questions on PR #295 to be raised by Jack in the TSC Meeting.
1
2
3
4
5
6
complex[float[32]] a = 3+4im;
complex[float[32]] b = 1+2im;
complex[float[32]] c = a * b; // valid
complex[float[32]] d = a + (5+6im); // invalid
complex[float[32]] e = a + complex[float[32]](5+6im); // invalid
Some more discussion: https://github.com/Qiskit/openqasm/pull/175
Meeting Notes
- BitArray.py file modified by Abeer, added types. Updates to BitArray.py discussed
- Discussion about bugs in AST (eg dd.qasm) Duration type flawed
- OpenPulse grammar: decision to go with custom grammar
- TODO List:
- BaseBitArray: List[Optional[bool]] ——–> Optional[str]
- BaseBitArray.value returns int
- BaseBitArray bitwise operations implementation (including rotr, rotl, popcount)
- Fix operations between Angle and other ClassicialTypes
- Logical and comparison operations (&&, ||, ==, !=, etc) overloading
- Duration: Casting to ‘machine-precision’ float (tentative: just use python float)
- Stretch: Not decided yet (Not Implemented)
- Discussion on #295 Discussion on Abeers comment and questions on the power operator in particular with regard to raising complex numbers to complex powers.
- Goals set for next week: Update public website
- Document formation for November 11 review.
- Sync up meet on Monday next.
Major checkpoints and directions for the project:
- Clean up and reconcile small changes made by Abeer and Adrien in the repo
- Restart repository based on importing the finished AST package
- Work in support of PR #295 and PR #296
- Investigate possibility of fulfilling PR #296 in implementing openpulse grammar