Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Shahnawaz Ahmed
    @quantshah
    Yes :smile: Let me check it out !
    Rogerluo
    @Roger-luo
    I'm currently working on the stabilizer circuits' simulations. which is stlzCircuit under QuCircuit{N}
    Shahnawaz Ahmed
    @quantshah
    Hi, I am currently visiting the QIC group at Harish Chandra Research Institute, Allahabad and I was talking to some of the people involved in writing code or running simulations. C++ is the preferred language here and they have developed their own library using Armadillo : http://qiclib.in/documentation.html. This is by Titas Chanda who is part of the group. I have been talking to him and he seems interested in learning more about JuliaQuantum.
    Shahnawaz Ahmed
    @quantshah
    Some of the code and functions like discord, tsallis entropy, concurrence, entanglement of formation etc can be put into the road map for JuliaQuantum perhaps if they are relevant. The group works more on the information theoretic aspects rather than algorithms.
    Also, @Roger-luo I am finishing up with learn-Julia-the-hard-way and as I gain better understanding of the nuances of the language I would be of more use perhaps. Any other pointers would be helpful to get involved.
    Xiaodong Qi
    @i2000s
    @sahmed95 It would be nice if you can help get on hold with the QIC group people. We plan to have a gitter chat/meeting soon on @Roger-luo 's project and the fundamental aspects of overall JuliaQuantum projects (for its future and theoretical fantasy). I am writing up the theory framework (no need to know algorithms) and slowly expanding to more reviewers. Will keep folks posted on the detailed plan. Stay tuned.
    Shahnawaz Ahmed
    @quantshah
    @i2000s I am here for 10 more days and I will try to talk to a few of the members here. The C++ library is by Titas Chanda (https://github.com/titaschanda) a PhD student here in the group. I talked to him today about JuliaQuantum.
    Shahnawaz Ahmed
    @quantshah
    The group here is involved with several things. Studying open quantum systems, quantum heat engines, measures of entanglement, etc. I was here as a summer student and attended a few of the talks. This came up during a casual chat about Quantum Libraries and performance of C++ code over Python or other interpreted languages. The group organizes an annual conference in December on Quantum Information processing : http://www.hri.res.in/~confqic/qipa15/
    Rogerluo
    @Roger-luo

    @sahmed95 I added some TODOs in the cir-dev branch's source code, you could check what you can do, I'm already working with stabilizer circuits, so just ignore the TODOs related to stabilizer circuits.

    Currently I think you would be able to do something related to the show functions for each type. I'm looking for a plot engine for circuit visulization (could be PlotlyJS or PyPlot, Compose.jl seems slower than these two, and @i2000s I remember you mentioned you had a LaTeX package for plotting circuits? ), if you are interested in circuit visualization, let's discuss the details (it will be implemented in show)

    Shahnawaz Ahmed
    @quantshah
    @Roger-luo Okay. I pulled your cir-dev branch and I am going through it. So, you want to override the show function in Julia base with something that displays a circuit when you call it. Is that correct ?
    Shahnawaz Ahmed
    @quantshah
    A cleverly written function can be used to display something like this in the terminal itself '''
    --block 1------|----block 2------|
    1 ------------ ----|--------------------|
    2 ----[ A ]----|--------------------|
    3 -----------------|------------ -------|
    4 -----------------|-----[ ]------|
    5 -----------------|-----[ B ]------|
    6 -----------------|-----[ ]------|
    ''' But I guess that is inefficient for long circuits or representing controlled gates. PyPlot seems a better choice. And an alternate option can be to use the javascript/html library d3.js. Although, I haven't used it but the basic idea is to take a Circuit (object) and convert it to XML like <svg width="50" height="50"> <rect x="0" y="0" width="50" height="50" fill="green" /> </svg> which can be rendered by a browser. Link. I am just shooting suggestions here. :smile:
    Amit
    @amitjamadagni
    Hello @Roger-luo could you re fork the repo QuCmp.jl there seems to .jl missing in your fork of the repo and might be the reason for failing tests ... I just had a quick glance do let me know if there are other reasons
    Shahnawaz Ahmed
    @quantshah
    Ah, PlotlyJS does the same thing it seems. :smile:
    Amit
    @amitjamadagni
    @sahmed95 you could look at this year's JuliaCon videos for more plotting libraries !
    Shahnawaz Ahmed
    @quantshah
    @amitjamadagni Thanks. Plot.jl looks nice.
    Xiaodong Qi
    @i2000s
    @Roger-luo We have two LaTeX packages to draw quantum circuit in LaTeX. One can be found at https://github.com/CQuIC/qcircuit, which was first developed by Steve Flammia and Bryan Eastin from CQuIC and now becomes basically a well-known CTAN package to draw qcircuits. It use xy-pic and ifpdf pacakges which have been gradually depreciated over years.
    The second one can be found at https://github.com/CQuIC/qcircuitz, which uses TikZ and I just made it as a public project from CQuIC private repository. It only outlined some rough ideas there -- any circuit can be defined by a matrix shaped grids and then filled with other elements. It's not as automatic as Qcircuit and we are open to better ideas, but it could be flexible enough due to the vast features of TikZ. Hope this helps.
    Rogerluo
    @Roger-luo
    yup, @sahmed95 , I think you could check the show (actually it's showarray) of SparseMatrixCSC, if you want to have a terminal version of the circuit, it adjusts what it shows in the terminal automatically. This could be useful to for people to check what they have already created immediately. And for plot engine, to my opinion, the Plots.jl is an interface for different plot engine. But it's still quite different when you use it in different engine (as my previous experience).
    I changed my fork's name, will this work? @amitjamadagni
    PlotlyJS is not totally free, but its default color looks better for me comparing to PyPlot....
    @i2000s That's cool, and I happened to know Prof. Steve Flammia in Sydney :-)
    I'll check the source code first.
    Rogerluo
    @Roger-luo
    LaTeX support could be necessary, as people will need this for publications. And QuTiP have already implemented some visualization for circuits by matplotlib, you could check it ! @sahmed95
    javascript engine would be useful, since this would be easier for frontend in the future , if we need. PyPlot can only generate picture files. d3.js and plotly.js are quite similar.
    Rogerluo
    @Roger-luo
    But I'm not sure whether engines like d3.js can generate eps files. I'll check this later.
    Shahnawaz Ahmed
    @quantshah
    @Roger-luo I spent some time exploring plots with Julia and put up a very basic implementation of a circuit using PyPlot. https://gist.github.com/sahmed95/5c7e1d0fee31ad91a3cbe1531df7cd9c For now, this is a very simple way to visualize a circuit once it takes in a Circuit type from your implementation.
    Shahnawaz Ahmed
    @quantshah
    Of course, there needs to be controlled gates, symbol for measurement, latex conversion etc etc. and this will need more discussion but lets first finalize the plotting engine since it will be a dependency for the entire package. I am in favor of PyPlot since it directly allows use of matplotlib which is widely used. It will be helpful to get support. @amitjamadagni What is your suggestion ?
    Rogerluo
    @Roger-luo

    @sahmed95 I guess you should check the QuTiP's implementation of quantum information processing first, their implementation would be a pretty good reference. I remember @amitjamadagni showed a js based simulator with GUI before.
    For the plot style, there should not be frames or axis and gates should have a "rectangle container". And I think you may also try compose.jl, which may get you more about plotting languages, and more consideration .

    ps. I guess the docs should be ahead of function in Julia, which could be different from python...

    So I may vote for js or pure Julia engine like compose.jl (not Gadfly, I tried compose.jl before and beside the problem about fonts, it's good with other stuff) :-)
    Rogerluo
    @Roger-luo
    JS engine's interactivity and its modern plotting style could be more attractive to me. (you could try PlotJS in Jupyter)
    And JS engine could be easier for us to implement a GUI based on JS in the future (I guess it's quite popular to write GUI in JS recently, since people could use them for APPs)
    Rogerluo
    @Roger-luo
    The design of process stuff in QuCmp.jl should make use of Julia's multiple dispatch. Different gates is actually different types as subtype of AbstractGateUnit.
    plot{N}(circuit::QuCircuit{N})
    plot(gate::HadamardUnit)
    plot{T,N}(gate::CtrlGateUnit{T,N})

    I would like to implement several plot functions like this. And in plot{N}(circuit::QuCircuit{N}), there would be a simple for loop, like this

    function plot{N}(circuit::QuCircuit{N})
          for gate in circuit.gates
                plot(gate)
          end
    end

    this function is not correct actually , but I hope you may guess what I mean here. The structure design of QuCmp.jl is actually trying to make use of its multiple dispatch feature, which may simplify and standardize the programming process of circuit simulation.

    Shahnawaz Ahmed
    @quantshah
    @Roger-luo Yeah, I am checking out Compose, and I got what you have in mind. I am was just trying something basic and slowly getting around writing julia code. QuTip seems like a great reference. http://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/example-quantum-gates.ipynb
    Rogerluo
    @Roger-luo
    Hi @sahmed95 , I'm planning to start some basic visualization in REPL here. Any idea about the plot engine now?
    Shahnawaz Ahmed
    @quantshah
    This is what is used under the hood for QuTip : http://physics.unm.edu/CQuIC/Qcircuit/ I think @i2000s might know about this.
    Shahnawaz Ahmed
    @quantshah
    If you just want circuit visualization, then a function to write a latex file which visualizaes the circuit based on this package can be developed. This is the same approach used by QuTip here : https://github.com/qutip/qutip/blob/master/qutip/qip/circuit.py#L927
    The latex code generated by this function based on the circuit and gates is then compiled by https://github.com/qutip/qutip/blob/master/qutip/qip/circuit_latex.py#L45
    Shahnawaz Ahmed
    @quantshah
    Otherwise, if you want to start from scratch compose.jl can be used. Or perhaps we can use the Cairo plotting engine directly. Another option can be the OpenGl based package GLVisualize. All these will give more flexibility but I think the latex package will be the fastest and perhaps easier to implement. It can be directly used since Julia has a Latex package with image handling. I dont think the plotting libraries will be of any help. @Roger-luo
    @amitjamadagni @Roger-luo Should this discussion be under an issue in the github repo? It makes it easier to keep track and have the links saved for later.
    Rogerluo
    @Roger-luo
    yes, sorry I didn't receive gitter's notice and please make an issue in QuCmp.jl :-) @sahmed95
    I'm just considering for the future GUI development
    I guess LaTeX package will be a dependency
    Rogerluo
    @Roger-luo
    Let's move the conversation to the issue
    Si
    @firevenus
    I think should be under issue discussion.
    Si
    @firevenus
    happy new year!
    Ismael Venegas Castelló
    @SalchiPapa
    Happy new year everyone! :D
    Xiaodong Qi
    @i2000s
    Happy new year indeed!
    Xiaodong Qi
    @i2000s
    Anyone?
    Xiaodong Qi
    @i2000s