Giter Site home page Giter Site logo

yaoblocksqasm.jl's Introduction

YaoBlocksQASM

Stable Dev Build Status Coverage

YaoBlocks interafce for the OpenQASM package.

Installation

YaoBlocksQASM is a   Julia Language   package. To install YaoBlocksQASM, please open Julia's interactive session (known as REPL) and press ] key in the REPL to use the package mode, then type the following command

pkg> add https://github.com/QuantumBFS/YaoBlocksQASM.jl

License

MIT License

yaoblocksqasm.jl's People

Contributors

github-actions[bot] avatar sov-trotter avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

yaoblocksqasm.jl's Issues

qasm marco return nothing

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

support QASM -> Blocks

currently missing QASM -> Blocks pass, you will need to define a qasm_str macro to support the syntax that YaoLang has.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.