Skip to content

🐛 Kernel Crash During verify with Different Sized Circuits with Boundary swap) #546

@MattePalte

Description

@MattePalte

Environment information

OS: Ubuntu 20.04
C++ Compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
mqt.core version: 2.7.0
mqt.qcec version: 2.7.1

Description

Running a comparison between two circuits led to a kernel crash of QCEC.

Expected behavior

The comparison should complete without causing a kernel crash.

How to Reproduce

  1. Create two QASM files with the following content:
    • qasm_a.qasm:
      OPENQASM 2.0;
      include "qelib1.inc";
      qreg q[1];
      rz(1) q[0];
    • qasm_b.qasm:
      OPENQASM 2.0;
      include "qelib1.inc";
      qreg q[3];
      swap q[1],q[2];
  2. Save the QASM content to files:
    path_qasm_1 = "qasm_a.qasm"
    path_qasm_2 = "qasm_b.qasm"
    
    with open(path_qasm_1, 'w') as file:
        file.write(qasm_a)
    
    with open(path_qasm_2, 'w') as file:
        file.write(qasm_b)
  3. Run the following code to verify the circuits:
    from mqt import qcec
    
    result = qcec.verify(
        str(path_qasm_1),
        str(path_qasm_2),
        transform_dynamic_circuit=True)
    equivalence = str(result.equivalence)

Additional Information

The kernel crashed while executing the code. The log has no interesting message:

23:38:10.947 [info] Restarted 55f0b765-eeab-41e1-a2d9-d71086dd5d5a
23:38:12.956 [error] Disposing session as kernel process died ExitCode: undefined, Reason:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingc++Anything related to C++ code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions