You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported Qiskit/benchpress#17, qasm imports lead to int overflows when qasm files contain large ints. E.g. this example will fail
OPENQASM 2.0;
include "qelib1.inc";
qreg q0[301];
creg c0[301];
h q0[300];
measure q0[300] -> c0[300];
if(c0==2037035976334486086268445688409378161051468393665936250636140449354381299763336706183397376) h q0[0];
with
thread '<unnamed>' panicked at crates/qasm2/src/lex.rs:279:42:
called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PanicException: called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }
How can we reproduce the issue?
Run the above QASM file with QuantumCircuit.from_qasm_file
What should happen?
It should be imported
Any suggestions?
The int is larger than int64, which I assume is the root cause.
The text was updated successfully, but these errors were encountered:
Thanks for the report. That's a pretty gross case. We fixed much of this in #12140, but this exact one implies we might need big-int handling in Rust space, if not now (we can hack around while we're still using Python space) then later just to represent huge classical register conditions.
Environment
What is happening?
As reported Qiskit/benchpress#17, qasm imports lead to int overflows when qasm files contain large ints. E.g. this example will fail
with
How can we reproduce the issue?
Run the above QASM file with
QuantumCircuit.from_qasm_file
What should happen?
It should be imported
Any suggestions?
The int is larger than int64, which I assume is the root cause.
The text was updated successfully, but these errors were encountered: