跳转至

utils

QuICT.algorithm.arithmetic.adder.utils.HLPeres

HLPeres(name: str = 'PG1')

Bases: CompositeGate

Implement a Peres Gate using T gates:

\[ \vert{c}\rangle \vert{b}\rangle \vert{a}\rangle \to \vert{a \cdot b\oplus c}\rangle \vert{a \oplus b}\rangle \vert{a}\rangle \]
References

[1]: "Efficient quantum arithmetic operation circuits for quantum image processing" by Hai-Sheng Li, Ping Fan, Haiying Xia, Huiling Peng and Gui-Lu Long https://doi.org/10.1007/s11433-020-1582-8

Parameters:

  • name (str, default: 'PG1' ) –

    the name of the Peres gate.

Source code in QuICT/algorithm/arithmetic/adder/utils/hl_Peres.py
def __init__(self, name: str = "PG1"):
    """
        Args:
             name (str): the name of the Peres gate.
    """
    super().__init__(name)
    self._pg_build()

QuICT.algorithm.arithmetic.adder.utils.HLTR1

HLTR1(name: str = 'TR1')

Bases: CompositeGate

Implement a TR1 Gate using T gates:

\[ \vert{c}\rangle \vert{b}\rangle \vert{a}\rangle \to \vert{a\cdot \bar{b}\oplus c}\rangle \vert{a\oplus b}\rangle \vert{a}\rangle \]
References

[1]: "Efficient quantum arithmetic operation circuits for quantum image processing" by Hai-Sheng Li, Ping Fan, Haiying Xia, Huiling Peng and Gui-Lu Long https://doi.org/10.1007/s11433-020-1582-8

Parameters:

  • name (str, default: 'TR1' ) –

    The name of TR1 gate.

Source code in QuICT/algorithm/arithmetic/adder/utils/hl_TR.py
def __init__(self, name: str = "TR1"):
    """
        Args:
            name (str, optional): The name of TR1 gate.
    """
    super().__init__(name)
    self._tr1_build()

QuICT.algorithm.arithmetic.adder.utils.HLTR2

HLTR2(name: str = 'TR2')

Bases: CompositeGate

Implement a TR2 Gate using T gates:

\[ \vert{c}\rangle \vert{b}\rangle \vert{a}\rangle \to \vert{a\cdot \bar{b}\oplus c}\rangle \vert{b}\rangle \vert{a \oplus b}\rangle \]
References

[1]: "Efficient quantum arithmetic operation circuits for quantum image processing" by Hai-Sheng Li, Ping Fan, Haiying Xia, Huiling Peng and Gui-Lu Long https://doi.org/10.1007/s11433-020-1582-8

Parameters:

  • name (str, default: 'TR2' ) –

    The name of TR2 gate.

Source code in QuICT/algorithm/arithmetic/adder/utils/hl_TR.py
def __init__(self, name: str = "TR2"):
    """
        Args:
            name (str, optional): The name of TR2 gate.
    """
    super().__init__(name)
    self._tr2_build()