Algorithms module

QdcEm.Algorithms — Distributed quantum algorithm circuits built on top of the RemoteGates library.


grover_2qubit_annotated_Distributed

grover_2qubit_annotated_Distributed(marked_states, kappa_Fiber,
                                     Steps, kappa_Transductor)

Constructs the distributed 2-qubit Grover’s search circuit across two logical QPUs, as described in Section 2.C and Figure 7(b) of the paper. Each QPU holds one processing qubit. The oracle applies a phase flip on the marked state via remote_cz; the diffusion operator uses remote_cx.

For a single marked state, one Grover iteration maximises the success probability (Figure 7a of the paper).

Parameters

Name

Type

Description

marked_states

list[str]

List of 2-bit strings to be marked, e.g. ['11'] or ['00', '11'].

kappa_Fiber

float

Fiber coupling constant κF.

Steps

int

Number of additional 10 m fiber segments.

kappa_Transductor

float

Transducer coupling constant κT.

Returns QuantumCircuit — 6-qubit distributed Grover circuit with final measurements on QPUA (c[4]) and QPUB (c[5]).


qft_circuit

qft_circuit(n)

Constructs the monolithic (non-distributed) n-qubit Quantum Fourier Transform circuit, as defined in Section 2.D of the paper. For each qubit j (0 to n-1) the circuit applies a Hadamard gate followed by controlled-phase rotations R_k (angle 2\u03c0/2^k) to every subsequent qubit, then a final SWAP layer reverses the qubit order to match the standard QFT output convention. For n = 5 this produces 5 Hadamard gates, 10 controlled-phase rotations, and 2 SWAP gates (Figure 8a of the paper). It is used as the noiseless/monolithic baseline against which qft_5qubit_annotated_Distributed is compared.

Parameters

Name

Type

Description

n

int

Number of qubits.

Returns QuantumCircuit — monolithic, unmeasured QFT circuit.


qft_5qubit_annotated_Distributed

qft_5qubit_annotated_Distributed(Steps, kappa_Fiber, kappa_Transductor)

Constructs the distributed 5-qubit QFT circuit across two logical QPUs, as described in Section 2.D and Figure 8(c) of the paper. QPU A holds QA1 and QA2; QPU B holds QB1, QB2, and QB3. Cross-QPU controlled-phase rotations are implemented as noisy remote_cp calls using G-654-E fiber (α = 0.0392 km-1).

To avoid the SWAP layer present in the standard monolithic circuit (Figure 8a), the qubit order is rearranged so that QA2 (the most significant qubit) appears first, yielding a SWAP-free implementation (Figure 8b). Measurements are taken in the original logical order.

Parameters

Name

Type

Description

Steps

int

Number of additional 10 m fiber segments per remote gate.

kappa_Fiber

float

Fiber coupling constant κF.

kappa_Transductor

float

Transducer coupling constant κT.

Returns QuantumCircuit — 9-qubit distributed QFT circuit with processing qubits unmeasured.


Internal noise-injection helpers

Algorithms.py also defines local copies of M_Unitary, remote_cz, remote_cx, and remote_cp that are functionally identical to the versions in RemoteGates module and are used internally by qft_5qubit_annotated_Distributed and grover_2qubit_annotated_Distributed. See RemoteGates module for full parameter documentation of these primitives.