Comments (3)
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.
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.
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)
- Enhance <QAOA portfolio tutorial> HOT 4
- Fermion Gaussian State Simulator HOT 3
- Stabilizer simulator
- Backend agnostic implementation of quantum Hamiltonian generation HOT 2
- Applying gates with jnp index HOT 7
- Support trainable adptive circuit HOT 2
- Implementation of SHVQE with QAS HOT 1
- tensor network representation of a tensor circuit HOT 2
- AttributeError: module 'tensorflow' has no attribute 'sparse' HOT 2
- Bug in qiskit circuit parsing HOT 2
- jit compile circuit with any gate HOT 2
- `copy` operation of DM circuit forgets previous `apply_general_kraus` operations HOT 1
- MPS circuit with JIT compilation HOT 8
- Sampling from circuit does not give proper bitstring HOT 4
- Add Jittor backend HOT 7
- Stabilizer simulation example utilizing stim backend HOT 14
- Add examples benchmarking different contractor settings provided by cotengra HOT 1
- Improve the slow complication of MPSCircuit HOT 16
- Vmap isn't working when using JAX-based MPSCircuits HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorcircuit.