Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGABRT Error with DelayMeasures Pass on Certain Circuits #1305

Closed
p51lee opened this issue Mar 22, 2024 · 0 comments · Fixed by #1312
Closed

SIGABRT Error with DelayMeasures Pass on Certain Circuits #1305

p51lee opened this issue Mar 22, 2024 · 0 comments · Fixed by #1312
Labels
bug Something isn't working

Comments

@p51lee
Copy link

p51lee commented Mar 22, 2024

Overview

Applying a DelayMeasures compilation pass to a specific circuit will result in a SIGABRT exit when accessing the circuit later.

Example and reproduction steps

Consider the following Python code:

import pytket
from pytket.passes import DelayMeasures

circuit_tket = pytket.Circuit(4, 4)
circuit_tket.CX(0, 1)
circuit_tket.Measure(3, 1)
circuit_tket.Measure(1, 1)
circuit_tket.X(1)
circuit_tket.CCX(1, 3, 2)
circuit_tket.Measure(2, 2)

# Apply the DelayMeasures pass to the circuit
print(DelayMeasures().apply(circuit_tket))

# Attempt to print the commands of the modified circuit
print(circuit_tket.get_commands())

Observed

Executing the above code results in a critical assertion failure and the process terminates unexpectedly with a SIGABRT signal:

True
[tket] [critical] Assertion '!"slice is empty"' (../../src/Circuit/macro_circ_info.cpp : operator++ : 935) failed.  Aborting.

Process finished with exit code 134 (interrupted by signal 6:SIGABRT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants