tencent-quantum-lab / tensorcircuit

Tensor network based quantum software framework for the NISQ era
https://tensorcircuit.readthedocs.io
Apache License 2.0
252 stars 75 forks source link

tensor network representation of a tensor circuit #196

Closed Marsmmz closed 7 months ago

Marsmmz commented 7 months ago

I'm working with tensorcircuit to build my quantum circuit and I've notice than we can use projector from tensorcircuit.quantum and it will return a QuOperator object which represent an operator in tensor network form. However, I can't figure out how to apply this porjector to my circuit. I think perhaps I need to represent my circuit in tensor network form. But I can't find relevent functions.

Can anybody please tell me how I can represent my tc.Circuit class circuit to as a tensor network? Many thanks!

refraction-ray commented 7 months ago

say if you have c = tc.Circuit(n), then c.quvector() is enough to extract the circuit as a tensor network in the format of QuVector

Marsmmz commented 7 months ago

Thanks a lot!