HF RL Explorer

Improve TwoLocal and RealAmplitudes synthesis when entanglement='full'

Improve TwoLocal and RealAmplitudes synthesis when entanglement='full': a task in swe-rebench-v2.1-rl-isolated-1k: SWE-rebench V2.1 RL, isolated grading (1k subset) (Harbor dataset). When choosing a TwoLocal or RealAmplitude or EfficientSU2 gate with entanglement=full on n-qubits (for VQE ansatz)…

The task

When choosing a `TwoLocal` or `RealAmplitude` or `EfficientSU2` gate with `entanglement=full` on n-qubits (for VQE ansatz), then we get a circuit with a CX sub-circuit that contains `n*(n-1)/2` CX gates. However, we can re-write this circuit with only `n-1` CX gates with a linear connectivity (see a code example…

Part of rycerzes/swe-rebench-v2.1-rl-isolated-1k.