JamieMair / QuantumCircuits.jl

A minimal quantum circuit simulator
MIT License
3 stars 0 forks source link

Add state overlap optimisation to measure expressivity of circuits #17

Closed AdamSmith-physics closed 1 month ago

AdamSmith-physics commented 2 months ago

First Pass

Second Pass

There is a big issue with compilation times when splitting a state vector into a tensor and using this for contraction. Try using MPS instead where all of the tensor will be rank 2, 3 or 4 at most.

AdamSmith-physics commented 2 months ago

Compilation times are a killer using TensorOperations. As you go to larger system sizes, you have to convert the state to a high-rank tensor and the higher the rank the longer the compilation times for some reason!

It took 1163 seconds to compile for N=16, and only 69 seconds to perform 500 iterations with M=4! This is ridiculous!

Might have to move to an exact MPS representation in order to reach larger system sizes. Then the tensors will all be rank-3.

JamieMair commented 2 months ago

Thanks Adam for this. Is this ready for a PR?

AdamSmith-physics commented 2 months ago

Yes, I think so actually. I will raise the request now.