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

Hybrid Schrodinger Feynman Simulator reports error for circuits with SWAP gates #269

Open
tyi1025 opened this issue Jul 24, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tyi1025
Copy link

tyi1025 commented Jul 24, 2023

mqt.ddsim version

0.1.dev387+g328fdec

OS

macOS Monterey

Python version

No response

C++ compiler

gcc 13.1.6

Additional environment information

No response

Description

The HybridSchrodingerFeynmanSimulator seems to fail when there is a SWAP gate present. It gives Assertion failed: (targets.size() == 2), function getDD, file Operations.hpp, line 240. The error disappears as long as you remove the SWAP line.

Expected behavior

The simulation results should be returned

How to Reproduce

    qc->x(0);
    qc->swap(0, 1);
    auto hybridSimulator = std::make_unique<HybridSchrodingerFeynmanSimulator<>>(
        std::move(qc), ApproximationInfo{}, 23);
    auto result = hybridSimulator->simulate(1024U);
@tyi1025 tyi1025 added the bug Something isn't working label Jul 24, 2023
@hillmich
Copy link
Member

Thank you for creating the issue! From the top of my head, I would guess that the splitting the circuit between two targets is not supported in the decomposition. I'll have a look.

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

No branches or pull requests

2 participants