Skip to content

Comments

Phase Kickback with Addition Decomposition#2

Open
jkalloor3 wants to merge 11 commits intomainfrom
pkac
Open

Phase Kickback with Addition Decomposition#2
jkalloor3 wants to merge 11 commits intomainfrom
pkac

Conversation

@jkalloor3
Copy link
Collaborator

Adding Passes/Gates to decompose RZ gates into Phase Kickback introduced in this paper: https://iopscience.iop.org/article/10.1088/1367-2630/14/11/115023/pdf

This pull request introduces several new gates and passes to support the PKAC (Phase Kickback Ancilla Circuit) mapping, including the implementation of the GidneyAdder, LogicalAnd, and FractionalRZ gates, as well as passes for converting between FractionalRZ and PKAC circuits. It also updates the replacement rule logic to allow removal of gates, and modifies default workflows to utilize this functionality. The changes are grouped as follows:

New Gates and Gadgets

  • Added FractionalRZGate, which represents an arbitrary rotation around the Z axis with parameters for numerator and k, allowing rotations of the form RZ(2π * numerator / 2^k). (bqskit/ft/gates/fractional_rz.py)
  • Implemented GidneyAdder as a circuit gate, following Gidney's quantum addition scheme, and using logical and gates and ancilla qubits. (bqskit/ft/gates/gidney_adder.py)
  • Added LogicalAndGate and its inverse LogicalAndDgGate, including their circuit construction and direct unitary implementation. (bqskit/ft/gates/logical_and.py)
  • Introduced QFTGadget, which generates quantum Fourier transform circuits for arbitrary numbers of qubits. (bqskit/ft/gadgets/qft.py)

Passes for PKAC Mapping

  • Added ConvertToPKAC pass, which replaces all FractionalRZGate instances in a circuit with QFT initialization and GidneyAdders, increasing qubit count and performing appropriate circuit transformations. (bqskit/ft/ftpasses/convert_to_pkac.py)
  • Added PKACtoGatesPass, converting GidneyAdders, QFTs, and LogicalAnds into gates suitable for tiling, including randomized CZ application for testing PKAC mapping. (bqskit/ft/ftpasses/pkac_to_gates.py)

Replacement Rule and Workflow Updates

  • Modified ReplacementRule to allow None as a replacement, which removes the matched gate from the circuit. (bqskit/ft/rules/replacement.py)
  • Updated clifford_replace in both cliffordrz and cliffordt workflows to use None for identity gate replacement, enabling gate removal. (bqskit/ft/cliffordrz/defaultworkflow.py, bqskit/ft/cliffordt/defaultworkflow.py)

Module and Export Updates

  • Added clifford_rz_gates to the __all__ export list in bqskit/ft/cliffordrz/__init__.py for proper module exposure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants