C2QA / bosonic-qiskit

Extension of Qiskit to support hybrid boson-qubit simulations for the NQI C2QA effort.
BSD 2-Clause "Simplified" License
51 stars 14 forks source link

Photon Loss Noise Pass fails with conditional gates #66

Closed tjstavenger-pnnl closed 2 years ago

tjstavenger-pnnl commented 2 years ago

The calculated Kraus operators are built for the circuit's cutoff size. If a conditional bosonic gate is used (e.g., conditional displacement or beam splitter), the operators are no longer large enough to represent all of the qubits used in the gate -- they aren't large enough for both the qumodes' qubits and the qubit control.

You end up with errors like: TranspilerError: 'Number of qubits of generated op 2 != 5 that of a reference op cBS'

tjstavenger-pnnl commented 2 years ago

I need to verify this is a valid way to address the issue, but #67 allows conditional gates to be used with our Kraus operators modeling photon loss