cunqa.circuit.circuit_extensions

Holds dunder methods for the class CunqaCircuit and other functions to extract information from it.

Functions

cunqa_dunder_methods

distr_ccx_ccz_cswap

Performs a either a Toffoli (ccx), or ccz, or cswap gate distributed between two circuits.

distr_rzz_rxx_ryy_rzx

Performs either a rzz, or rxx, or ryy, or rzx gate distributed between two circuits. The rzz gate decomposition is q_1: ──■─────────────────■── ┌─┴─┐┌───────────┐┌─┴─┐ q_2: ┤ X ├┤ Rz(param) ├┤ X ├ └───┘└───────────┘└───┘.

Exceptions

HorizontalDivisionError

Signals that a gate for which we haven't defined a division was found while trying to horizontally divide a circuit.