Closed QuantumFall closed 2 years ago
Hi @QuantumFall, thank you for reporting this bug! We will look into it.
Hi @QuantumFall, the example you shared should work now on the master
branch of the PennyLane repo. Support for gates acting on more than 2 qubits is future work with transpile
.
Expected behavior
qml.transforms.transpile does not add SWAP gates for MultiRZ operations between 2 qubits and just ignores it. This might be due to MultiRZ being able to act on more than 2 qubits at a time. However, it's currently the only way to add RZZ gates between 2 qubits.
This makes it difficult to see the transpiled circuit for QAOA setups as attempting to transpile a circuit constructed from
qml.qaoa
functions just produces the decomposition of the problem unitary (aka U_H) into RZZ gates that don't match the coupling map.Short example (expected behaviour using CX gates):
Actual behavior
But changing to MultiRZ (which is currently the only way to implement RZZ unless I manually decomp them into CX-RZ-CX) gives:
Additional information
Full QAOA example below:
Source code
Tracebacks
No response
System information
Existing GitHub issues