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

qasm marco return nothing #15

Open
contra-bit opened this issue Sep 18, 2023 · 0 comments
Open

qasm marco return nothing #15

contra-bit opened this issue Sep 18, 2023 · 0 comments

Comments

@contra-bit
Copy link

contra-bit commented Sep 18, 2023

Good Day,

Will working on #14 I have not been able to convert qasm into YaoBlocks.
I have tried the qasm"""""" and the @qasm_string marco.

In my pull request #14 I have written tests, which reproduce this error. The PR is for testing the functionality of blocks.jl in #9 branch.

Here is an example, which works I expect to work, but fail because circuit1 is nothing.

using YaoBlocksQASM
 circuit1 = qasm"""OPENQASM 2.0;
        include "qelib1.inc";
        qreg q[3];
        creg c1[3];
        h q[0];
        CX q[1],q[2];
        cy q[1],q[0];
        cz q[0],q[2];
        x q[0];
        swap q[1],q[2];
        id q[0];
        t q[1];
        rz(0.7) q[2];
        z q[0];
        p(0.7) q[1];
        ry(0.7) q[2];
        y q[0];
        rx(0.7) q[1];
        measure q[0] -> c1[0];
        measure q[1] -> c1[1];
        measure q[2] -> c1[2];    
             """
typeof(circuit1) != nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant