Giter Club home page Giter Club logo

Comments (3)

refraction-ray avatar refraction-ray commented on July 4, 2024

It is not only a type conversion. If you keep the input density matrix in sparse matrix form, how to deal with gate application in the language of tensor network in implementation level? It requires heavy code refactoring if possible.

An alternative is to use mpo_dminputs where you specify the input density matrix in the form of MPO instead of sparse matrix to save the memory. Of course, not every sparse matrix has efficient MPO representation, it depends on your sepcific user scenario.

from tensorcircuit.

royess avatar royess commented on July 4, 2024

OK, I can understand the difficulty.

If you keep the input density matrix in sparse matrix form, how to deal with gate application in the language of tensor network in implementation level?

Notice that sparse matrices for observable expectations are already implemented. I am wondering whether we can do a similar thing for input states. Because input states and observables seem to be dual to each other in my understanding.

from tensorcircuit.

refraction-ray avatar refraction-ray commented on July 4, 2024

Notice that sparse matrices for observable expectations are already implemented. I am wondering whether we can do a similar thing for input states. Because input states and observables seem to be dual to each other in my understanding.

A very interesting point! Of course the input state and the observable are dual where you can simulate the same quantity by specifying the observable as the input state in mpo_dminputs form and get the tensor network representation of the "density matrix". The final step will involved compute the trace of a mpo based matrix and a spares matrix then, which I am not sure whether there is a sparse matrix tailored primitive for this. In the pure state case, to compute some expectation, the final computation is a sparse matrix multiplied by the wavefunction vector which can be well captured by a sparse_matmul primitive.

Essentially, the observable expectation for sparse matrix is only valid for pure state simulator as well.

from tensorcircuit.

Related Issues (20)

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.