Skip to content

Remove unnecessary SWAP in qrecv - wasting quantum resources #4

@CardamaS99

Description

@CardamaS99

Description

File: netqmpi/sdk/primitives/p2p/p2p.py (lines ~78-84)

Problem

After applying the X/Z corrections in teleportation, epr already contains the teleported state. The SWAP to a new qubit q is completely unnecessary:

q = Qubit(communicator.connection)
epr.cnot(q)
q.cnot(epr)
epr.cnot(q)
qubits.append(q)

This wastes 1 qubit + 3 quantum gates per received qubit.

Solution

qubits.append(epr)

Impact

  • Severity: High
  • Savings: 1 qubit + 3 gates per received qubit
  • Affects: All receive operations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions