Git Product home page Git Product logo

Comments (7)

amilsted avatar amilsted commented on May 3, 2024

Thanks for trying out TensorNetwork! As you may have noticed, we don't currently build any semantics into TensorNetwork itself - we make no assumptions in the core code about the meaning of the tensor that the network represents. This is a clean way to implement basic tensor network features.

That said, it would be interesting to explore how best to add such quantum functionality! One way would be to create a "wavefunction" or "quantum_state" class that inherits from our Network class. This could then provide features like the ones you suggest on top of what we have already. Alternatively, this could also be done via a library of functions that take tensor networks as inputs, returning e.g. a new network representing the reduced state.

Any thoughts @Thenerdstation and @mganahl ?

from tensornetwork.

chaserileyroberts avatar chaserileyroberts commented on May 3, 2024

I agree with Ash, this seems like something for for an extension of TensorNetwork.

Though I also wonder if it's even really needed. Doing it with the current features of the library should be fairly straightforward.

For example:

net1, qubit_edges1 = make_wavefunction(...)
net2, qubit_edges2 = make_wavefunction(...)
net1.add_subnetwork(net2)
for qubit in [3, 5, 7]: # or whatever you want.
  net.connect(qubit_edges1[qubit], qubit_edges2[qubit])

tensornetwork.contractors.naive(net1)

net1.get_final_node().tensor # Here is your RDM.

Pretty short and sweet. The only other reason I could see for adding this is to optimize the compute needed to calculate the RDM. This would relate back to our "inner shape vs outer shape" issue from earlier.

from tensornetwork.

amilsted avatar amilsted commented on May 3, 2024

Yes, this stuff is not hard to do (you're quite the quantum physicist these days, @Thenerdstation!). However, including it either in TensorNetwork, or in a package that extends it, would surely be useful for some people. This could form a new "example", or be an extension of the "wavefunctions" example we currently have, or it could be a separate project, or it could become a core part of TensorNetwork.

My inclination would be not to add it to the core since I think it is better to focus on the basics in TensorNetwork. So, insofar as this goes beyond an "example" or "experiment", my feeling is it would be better off as a separate, dependent project. How about "QuantumTensorNetwork"? ;)

from tensornetwork.

chaserileyroberts avatar chaserileyroberts commented on May 3, 2024

Thanks! I've been taking classes ^-^.

from tensornetwork.

amilsted avatar amilsted commented on May 3, 2024

Related question: What is our long-term plan for the "experiments"? Do they eventually get upgraded to fully-fledged parts of the library, or split out into their own separate projects?

from tensornetwork.

chrisnakers avatar chrisnakers commented on May 3, 2024

Thanks! If you do make a QuantumTensorNetwork dependent project, I would use it!

from tensornetwork.

chaserileyroberts avatar chaserileyroberts commented on May 3, 2024

I think we'll keep it under this TensorNetwork package.

from tensornetwork.

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.