Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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)GidneyAdderas a circuit gate, following Gidney's quantum addition scheme, and using logical and gates and ancilla qubits. (bqskit/ft/gates/gidney_adder.py)LogicalAndGateand its inverseLogicalAndDgGate, including their circuit construction and direct unitary implementation. (bqskit/ft/gates/logical_and.py)QFTGadget, which generates quantum Fourier transform circuits for arbitrary numbers of qubits. (bqskit/ft/gadgets/qft.py)Passes for PKAC Mapping
ConvertToPKACpass, which replaces allFractionalRZGateinstances in a circuit with QFT initialization and GidneyAdders, increasing qubit count and performing appropriate circuit transformations. (bqskit/ft/ftpasses/convert_to_pkac.py)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
ReplacementRuleto allowNoneas a replacement, which removes the matched gate from the circuit. (bqskit/ft/rules/replacement.py)clifford_replacein bothcliffordrzandcliffordtworkflows to useNonefor identity gate replacement, enabling gate removal. (bqskit/ft/cliffordrz/defaultworkflow.py,bqskit/ft/cliffordt/defaultworkflow.py)Module and Export Updates
clifford_rz_gatesto the__all__export list inbqskit/ft/cliffordrz/__init__.pyfor proper module exposure.