qiskit-qasm3-import icon indicating copy to clipboard operation
qiskit-qasm3-import copied to clipboard

Computations within gate parameters leads to Parsing Error

Open mbeisel opened this issue 5 months ago • 0 comments

When exporting circuits that contain a computation within the parameters the qasm3 import leads to errors

Example:


OPENQASM 3;
include "stdgates.inc";
input float[64] gamma0;
gate rzz_1466526231824(gamma0) _gate_q_0, _gate_q_1 {
  cx _gate_q_0, _gate_q_1;
  rz(2.0*gamma0) _gate_q_1;
  rz(0.5*gamma0) _gate_q_0;
  ...
}
...

This is problematic when different gates require different multiples of a specific parameter.

Since the qasm3 exporter enables this feature, the importer should support it too, as otherwise unexpected errors can occur.

mbeisel avatar Jan 12 '24 13:01 mbeisel