QPU module

QdcEm.QPU — QPU data structure and initial-layout utilities.


Make

Make(Comm, EN, Processing_Qubits)

A lightweight data class that bundles the three qubit roles required by every QPU in the emulation.

Attributes

Name

Type

Description

Comm

Qubit

The communication qubit that mediates the entangled channel.

EN

Qubit

The environment ancilla qubit, recycled via reset between collisions.

Processing_Qubits

list[Qubit]

One or more processing qubits that hold the algorithm’s logical state.

Example

qpu_A = Make(Comm=qreg[0], EN=qreg[1], Processing_Qubits=[qreg[2], qreg[3]])

Get_Initial_Layout

Get_Initial_Layout(QPUs, QRG)

Constructs a Qiskit Layout object mapping the logical qubit register to physical device qubits. The layout is built in order: Comm, EN, then each qubit in Processing_Qubits, for each QPU in the list.

Parameters

Name

Type

Description

QPUs

list[Make]

Ordered list of QPU objects.

QRG

QuantumRegister

The circuit’s quantum register whose indices are mapped to physical qubits.

Returns Layout — Qiskit transpiler layout for use with transpile(..., initial_layout=...).