cunqa.circuit.circuit_extensions.distr_rzz_rxx_ryy_rzx

cunqa.circuit.circuit_extensions.distr_rzz_rxx_ryy_rzx(instr: dict, upper_circuit: CunqaCircuit, lower_circuit: CunqaCircuit, n: int) None

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 ├

└───┘└───────────┘└───┘

Rxx: Ryy: Rzx:

┌───┐ ┌───┐ ┌─────────┐ ┌──────────┐

1: ┤ H ├─■──────────┤ H ├ 1: ┤ Rx(π/2) ├─■──────────┤ Rx(-π/2) ├ 1: ──────■───────────────

├───┤ │ZZ(param) ├───┤ ├─────────┤ │ZZ(param) ├──────────┤ ┌───┐ │ZZ(param) ┌───┐

2: ┤ H ├─■──────────┤ H ├ 2: ┤ Rx(π/2) ├─■──────────┤ Rx(-π/2) ├ 2: ┤ H ├─■──────────┤ H ├

└───┘ └───┘ └─────────┘ └──────────┘ └───┘ └───┘

Parameters:
  • instr (dict) – the instruction to divide

  • upper_circuit (CunqaCircuit) – circuit with the first n qubits of the original circuit

  • lower_circuit (CunqaCircuit) – circuit with the last num_qubits - n qubits of the original circuit

  • n (int) – number of qubits of the upper_circuit