openqasm / qe-compiler

An MLIR based compiler dynamic circuit compiler for real-time control systems supporting OpenQASM 3
Other
46 stars 15 forks source link

Failure to parse classical expressions with binary and unary operations combined #278

Closed taalexander closed 6 months ago

taalexander commented 7 months ago

When attempting to compile an expression like

OPENQASM 3.0;

qubit $0;

gate x q {}

bit[4] qc0_c0;

if ((qc0_c0[0] & qc0_c0[1] | qc0_c0[0] & qc0_c0[2] | qc0_c0[1] & qc0_c0[2]) & ~(qc0_c0[0] & qc0_c0[1] & qc0_c0[2])) {
    x $0;
}
qc0_c0[3] = measure $0;

this is likely a qss-qasm parsing issue.