Refactored _apply_2q_gate so that it does not apply funnel tensors (which were a major memory bottleneck). Instead, the gate is "pushed" through the TTN from the leaf contaning qubit q0 to the leaf containing q1 via consecutive applications of contract_decompose.
Checklist
[x] I have performed a self-review of my code.
[x] I have commented hard-to-understand parts of my code.
[x] I have added tests that prove my fix is effective or that my feature works.
Description
Refactored
_apply_2q_gate
so that it does not apply funnel tensors (which were a major memory bottleneck). Instead, the gate is "pushed" through the TTN from the leaf contaning qubitq0
to the leaf containingq1
via consecutive applications ofcontract_decompose
.Checklist