Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(3)  |  Derive(4)  |  Import(9)
Non-controlled unitary gate operator that acts on qubits.

This is a general abstract gate that needs to be subclassed to do anything
useful.

Parameters
----------
label : tuple, int
    A list of the target qubits (as ints) that the gate will apply to.
(more...)

src/s/y/sympy-HEAD/sympy/physics/quantum/identitysearch.py   sympy(Download)
from sympy import Mul, Basic, Number, Pow, Integer
from sympy.matrices import Matrix, eye
from sympy.physics.quantum.gate import (Gate, X, Y, Z, H, S, T, CNOT,
        IdentityGate, gate_simp)
from sympy.physics.quantum.represent import represent

src/s/y/sympy-HEAD/sympy/physics/quantum/qft.py   sympy(Download)
from sympy.physics.quantum.tensorproduct import matrix_tensor_product
 
from sympy.physics.quantum.gate import (
    Gate, HadamardGate, SwapGate, OneQubitGate, CGate, PhaseGate, TGate, ZGate
)
class Fourier(Gate):
    """Superclass of Quantum Fourier and Inverse Quantum Fourier Gates."""
 
    @classmethod
    def _eval_args(self, args):

src/s/y/sympy-HEAD/sympy/physics/quantum/circuitplot.py   sympy(Download)
from sympy.core.compatibility import u
from sympy.external import import_module
from sympy.physics.quantum.gate import Gate,OneQubitGate,CGate,CGateS
 
__all__ = [

src/s/y/sympy-HEAD/sympy/physics/quantum/shor.py   sympy(Download)
from sympy.utilities.iterables import variations
 
from sympy.physics.quantum.gate import Gate
from sympy.physics.quantum.qubit import Qubit, measure_partial_oneshot
from sympy.physics.quantum.qapply import qapply
class CMod(Gate):
    """A controlled mod gate.
 
    This is black box controlled Mod function for use by shor's algorithm.
    TODO implement a decompose property that returns how to do this in terms

src/s/y/sympy-HEAD/sympy/physics/quantum/grover.py   sympy(Download)
from sympy.physics.quantum.hilbert import ComplexSpace
from sympy.physics.quantum.operator import UnitaryOperator
from sympy.physics.quantum.gate import Gate
from sympy.physics.quantum.qubit import IntQubit
 
class OracleGate(Gate):
    """A black box gate.
 
    The gate marks the desired qubits of an unknown function by flipping
    the sign of the qubits.  The unknown function returns true when it
class WGate(Gate):
    """General n qubit W Gate in Grover's algorithm.
 
    The gate performs the operation ``2|phi><phi| - 1`` on some qubits.
    ``|phi> = (tensor product of n Hadamards)*(|0> with n qubits)``

src/s/y/sympy-HEAD/sympy/physics/quantum/circuitutils.py   sympy(Download)
from sympy.utilities import numbered_symbols
from sympy.core.compatibility import reduce
from sympy.physics.quantum.gate import Gate
 
__all__ = [

src/s/y/sympy-HEAD/sympy/core/tests/test_args.py   sympy(Download)
def test_sympy__physics__quantum__gate__CGate():
    from sympy.physics.quantum.gate import CGate, Gate
    assert _test_args(CGate((0, 1), Gate(2)))
 
 
def test_sympy__physics__quantum__gate__CGateS():
    from sympy.physics.quantum.gate import CGateS, Gate
    assert _test_args(CGateS((0, 1), Gate(2)))
def test_sympy__physics__quantum__gate__Gate():
    from sympy.physics.quantum.gate import Gate
    assert _test_args(Gate(0))