ngnrsaa / qflex

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor network, CPU-based simulator of large quantum circuits.
Apache License 2.0
97 stars 25 forks source link

Create functionality for contraction with open indexes #29

Open benjaminvillalonga opened 5 years ago

benjaminvillalonga commented 5 years ago

When computing all amplitudes of the "open" region of the circuit, it is faster to contract that region without closing the indexes. The resulting tensor is contracted with the tensor resultant from the rest of the circuit.

95-martin-orion commented 5 years ago

On this topic, there's currently some redundancy between the "qubits_A" input value and the "terminal_cuts" in contraction ordering. This should be consolidated to a single source of truth - keeping it in the contraction ordering seems correct to me.

95-martin-orion commented 5 years ago

The "qubits_A" field was removed in #30 - it is now parsed from contraction ordering. There's a TODO in the code to update this parsing to use the new operation.