p-SWAP Gate: Phase-Adjusted Quantum Swap
- p-SWAP gate is a quantum gate that swaps two qubit states with an adjustable phase shift, generalizing the standard SWAP operation.
- It uses only two CNOT gates and single-qubit RZ rotations via a Bloch sphere approach, reducing both gate count and circuit depth.
- Experimental implementation on IBM hardware demonstrates approximately 23% quantum cost and 26% depth reduction, enhancing both phase and Boolean oracle constructions.
The p-SWAP gate is a quantum gate that generalizes the conventional SWAP operation by not only exchanging the quantum states of two qubits but also applying a customizable phase shift, denoted p, to selected basis states such as |01⟩ and |10⟩. This gate has been developed to address both phase-sensitive and Boolean logic requirements in quantum algorithms, offering reduced quantum cost and circuit depth compared to the standard SWAP constructed from three CNOT gates. The key innovation is the use of only two CNOT gates in conjunction with single-qubit phase rotations, e.g., RZ gates on IBM hardware, with the precise phase selection made using a geometric Bloch sphere approach. The p-SWAP construction is particularly advantageous for both phase oracles—where controlled phases are crucial—and standard Boolean oracles—where p can be ignored. Experimental realization has shown a quantum cost reduction of approximately 23% and a depth minimization of about 26% relative to the standard SWAP after transpilation on state-of-the-art quantum hardware (Al-Bayaty et al., 22 Oct 2024Al-Bayaty et al., 23 Jul 2025).
1. Formal Definition and Key Properties
The p-SWAP ("Boolean-Phase SWAP") gate acts on any two qubits, swapping their states and introducing a tunable phase shift p to one or more of the swapped computational basis states. The parameter p is chosen from the range , and the phase effect is realized using standard single-qubit RZ rotations. The action of the p-SWAP gate on the computational basis can be summarized as follows:
When , the operation reduces to the standard SWAP; when , it returns the iSWAP gate up to global phase. For Boolean-only operations (oracle constructions not requiring phase discrimination), the phase parameter p can be omitted.
2. Circuit Construction and Bloch Sphere Approach
The circuit for the p-SWAP gate is a sequence of native quantum gates designed for cost-efficiency. Its construction (see (Al-Bayaty et al., 22 Oct 2024Al-Bayaty et al., 23 Jul 2025)) involves:
- Only two CNOT (Feynman) gates
- Single-qubit RZ gates (for phase injection), and possibly single-qubit RX (VX) gates for state preparation and restoration
The design methodology leverages the geometric intuition of the Bloch sphere. The desired phase p is determined by partitioning the Bloch sphere's XY-plane into intervals (semicircles for , quadrants for , octants for , etc.), allowing the circuit designer to select a rotation that implements the required phase without explicit matrix multiplication. This facilitates the selection of cofactor values for the RZ gates directly from the geometric representation.
High-Level Quantum Circuit Layout
1 2 3 |
|q₀⟩ ──[VX]──●────[v = RZ]───── │ |q₁⟩ ───────X────[VX]──[w = RZ]── |
3. Cost-Effectiveness and Performance Metrics
The major operational advantage of the p-SWAP gate is the reduction in quantum resources during implementation:
- Gate Count: Standard SWAP—three CNOTs; p-SWAP—two CNOTs plus single-qubit rotations.
- Quantum Cost: Experimental synthesis and transpilation for the IBM ibm_brisbane device shows the p-SWAP circuit achieves approximately 23% fewer quantum operations (Transpilation Quantum Cost, TQC) and a depth reduction of about 26% compared to the canonical SWAP.
These improvements are significant in noisy intermediate-scale quantum (NISQ) regimes where error rates and decoherence place strict limits on achievable circuit depth and two-qubit gate counts.
4. Application Domains and Use Cases
The p-SWAP gate addresses a broad range of algorithmic scenarios:
- Phase Oracles: When quantum algorithms need to encode or retrieve information in the phase of qubit states, the ability to control p is essential. The gate's tunability enables cost-effective implementation of phase-variant oracles and precise quantum phase estimation circuits.
- Boolean Oracles: In algorithms where only permutation of basis states matters, such as reversible Boolean circuits, the phase can be set arbitrarily (or omitted), allowing the p-SWAP to serve as a cost-effective SWAP replacement.
- Cost-Effective iSWAP Generalization: By choosing , the gate realizes an iSWAP or its inverse without additional logic.
- Quantum Fourier Transform (QFT), Quantum Approximate Optimization Algorithm (QAOA), and Grover's Algorithm: Any quantum algorithm requiring cost-efficient swap or entanglement operations.
- Hybrid Boolean–Phase Circuits: The gate can function as both a pure SWAP and a phase gate in logic that combines Boolean and phase-sensitive components.
5. Experimental Realization and Validation
Practical implementation experiments were conducted using IBM Quantum hardware:
- Designs for standard SWAP, iSWAP, and p-SWAP were transpiled to native gate sets and benchmarked on hardware such as ibm_brisbane (127 qubits).
- Transpilation Quantum Cost and circuit depth were used as metrics, with the p-SWAP design outperforming the standard approach in both metrics.
- The flexible phase tuning was validated by matching effective operation to the iSWAP for radians, and to the standard SWAP for .
Implementation | CNOT Gates | TQC Reduction | Depth Reduction |
---|---|---|---|
Standard SWAP | 3 | 0% | 0% |
p-SWAP | 2 | ~23% | ~26% |
These results indicate that p-SWAP is a resource-efficient and versatile primitive for both current and future quantum computing platforms (Al-Bayaty et al., 22 Oct 2024Al-Bayaty et al., 23 Jul 2025).
6. Limitations and Constraints
The p-SWAP is designed for two-qubit systems; its effectiveness and generality in higher-dimensional (qudit) systems or multi-qubit swap networks have not been established in the literature. The design assumes the availability of high-fidelity native single-qubit rotations (RZ-type) and CNOT operations. For applications requiring strict parity preservation or for certain qudit dimensions where permutation parity is nontrivial, the use of only CNOTs may be insufficient, as established in (1101.4159). A plausible implication is that for qudit-based systems or constrained quantum architectures, adaptations or extensions of the p-SWAP may be necessary to preserve correctness.
7. Position Relative to Other SWAP-Like Gates
The p-SWAP gate should be distinguished from:
- Partial-swap or probabilistic SWAP gates (sometimes also abbreviated p-SWAP in other contexts) that implement non-unitary or post-selected swap operations, such as in photonic fusion protocols (Wei et al., 2020);
- Power-of-SWAP gates () used in solid-state and dynamic qubit settings for entangling or exchange-based gates (Liu et al., 2020Lepage et al., 2020);
- Hardware-optimized or resource-aware SWAPs for error-mitigated routing or embedding (Chiew et al., 24 Jun 2024).
The formal p-SWAP gate described in (Al-Bayaty et al., 22 Oct 2024Al-Bayaty et al., 23 Jul 2025) is a deterministic, circuit-level primitive with explicit phase tunability, rather than a post-selected, partial, or exchange-power operation.
Summary
The p-SWAP gate provides a cost-effective and phase-generalized alternative to the standard SWAP in quantum circuits. Leveraging a geometric circuit design grounded in the Bloch sphere, it achieves state exchange with tunable phase shift using only two CNOTs and single-qubit rotations, thereby reducing quantum cost and depth by over 20% relative to canonical approaches. The gate is directly applicable to both Boolean and phase logic synthesis and is validated through experimental implementations on superconducting quantum processors (Al-Bayaty et al., 22 Oct 2024Al-Bayaty et al., 23 Jul 2025). This construction addresses the practical imperative for resource efficiency in quantum circuit compilation, optimizing both for present NISQ-era hardware and for general algorithmic settings requiring conditional swaps with controlled phases.