Skip to content

qasm marco return nothing #15

@contra-bit

Description

@contra-bit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions