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

All Samples(30)  |  Call(4)  |  Derive(16)  |  Import(10)
A Hermitian operator that satisfies H == Dagger(H).

Parameters
==========

args : tuple
    The list of numbers or parameters that uniquely specify the
    operator. For time-dependent operators, this will include the time.

Examples(more...)

src/n/c/ncpol2sdpa-1.0/ncpol2sdpa/ncutils.py   ncpol2sdpa(Download)
from math import floor
from sympy.core import S, Symbol, Pow, Number
from sympy.physics.quantum.operator import HermitianOperator, Operator
from sympy.physics.quantum.dagger import Dagger
 
    variables = [0] * n_vars
    for i in range(n_vars):
        variables[i] = HermitianOperator('X%s' % i)
    return variables
 

src/n/c/ncpol2sdpa-1.0/ncpol2sdpa/sdprelaxation.py   ncpol2sdpa(Download)
from sympy import S
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.operator import HermitianOperator
from .ncutils import get_ncmonomials, pick_monomials_up_to_degree, \
    get_variables_of_polynomial, ncdegree
            if len(monomial_blocks) > 1:
                identity_operator = HermitianOperator(
                    "1_%s" %
                    (monomial_block_index))
                identity_operator.is_commutative = True

src/s/y/sympy-HEAD/sympy/physics/quantum/gate.py   sympy(Download)
from sympy.physics.quantum.qexpr import QuantumError
from sympy.physics.quantum.hilbert import ComplexSpace
from sympy.physics.quantum.operator import (UnitaryOperator, Operator,
                                            HermitianOperator)
from sympy.physics.quantum.matrixutils import matrix_tensor_product, matrix_eye
class HadamardGate(HermitianOperator, OneQubitGate):
    """The single qubit Hadamard gate.
 
    Parameters
    ----------
class XGate(HermitianOperator, OneQubitGate):
    """The single qubit X, or NOT, gate.
 
    Parameters
    ----------
class YGate(HermitianOperator, OneQubitGate):
    """The single qubit Y gate.
 
    Parameters
    ----------
class ZGate(HermitianOperator, OneQubitGate):
    """The single qubit Z gate.
 
    Parameters
    ----------

src/s/y/sympy-HEAD/sympy/physics/quantum/spin.py   sympy(Download)
 
from sympy.physics.quantum.qexpr import QExpr
from sympy.physics.quantum.operator import (HermitianOperator, Operator,
                                            UnitaryOperator)
from sympy.physics.quantum.state import Bra, Ket, State
class JxOp(SpinOpBase, HermitianOperator):
    """The Jx operator."""
 
    _coord = 'x'
 
class JyOp(SpinOpBase, HermitianOperator):
    """The Jy operator."""
 
    _coord = 'y'
 
class JzOp(SpinOpBase, HermitianOperator):
    """The Jz operator."""
 
    _coord = 'z'
 
class J2Op(SpinOpBase, HermitianOperator):
    """The J^2 operator."""
 
    _coord = '2'
 

src/s/y/sympy-HEAD/sympy/physics/quantum/density.py   sympy(Download)
from sympy.printing.pretty.stringpict import prettyForm
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.operator import HermitianOperator, OuterProduct, Operator
from sympy.physics.quantum.represent import represent
from sympy.physics.quantum.matrixutils import numpy_ndarray, scipy_sparse_matrix, to_numpy
from sympy.physics.quantum.tensorproduct import TensorProduct, tensor_product_simp
 
 
class Density(HermitianOperator):

src/s/y/sympy-HEAD/sympy/physics/quantum/cartesian.py   sympy(Download)
from sympy.physics.quantum.constants import hbar
from sympy.physics.quantum.hilbert import L2
from sympy.physics.quantum.operator import DifferentialOperator, HermitianOperator
from sympy.physics.quantum.state import Ket, Bra, State
 
class XOp(HermitianOperator):
    """1D cartesian position operator."""
 
    @classmethod
    def default_args(self):
class YOp(HermitianOperator):
    """ Y cartesian coordinate operator (for 2D or 3D systems) """
 
    @classmethod
    def default_args(self):
class ZOp(HermitianOperator):
    """ Z cartesian coordinate operator (for 3D systems) """
 
    @classmethod
    def default_args(self):
class PxOp(HermitianOperator):
    """1D cartesian momentum operator."""
 
    @classmethod
    def default_args(self):

src/s/y/sympy-HEAD/sympy/physics/quantum/identitysearch.py   sympy(Download)
        IdentityGate, gate_simp)
from sympy.physics.quantum.represent import represent
from sympy.physics.quantum.operator import (UnitaryOperator,
        HermitianOperator)
from sympy.physics.quantum.dagger import Dagger

src/s/y/sympy-HEAD/sympy/physics/quantum/piab.py   sympy(Download)
from sympy import Symbol, pi, sqrt, sin, Interval, S
 
from sympy.physics.quantum.operator import HermitianOperator
from sympy.physics.quantum.state import Ket, Bra
from sympy.physics.quantum.constants import hbar
class PIABHamiltonian(HermitianOperator):
    """Particle in a box Hamiltonian operator."""
 
    @classmethod
    def _eval_hilbert_space(cls, label):

src/s/y/sympy-HEAD/sympy/physics/quantum/tests/test_operator.py   sympy(Download)
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.hilbert import HilbertSpace
from sympy.physics.quantum.operator import (Operator, UnitaryOperator,
                                            HermitianOperator, OuterProduct,
                                            DifferentialOperator)
class CustomOp(HermitianOperator):
    @classmethod
    def default_args(self):
        return ("T",)
 
def test_hermitian():
    H = HermitianOperator('H')
 
    assert isinstance(H, HermitianOperator)
    assert isinstance(H, Operator)

src/s/y/sympy-HEAD/sympy/core/tests/test_args.py   sympy(Download)
def test_sympy__physics__quantum__operator__HermitianOperator():
    from sympy.physics.quantum.operator import HermitianOperator
    assert _test_args(HermitianOperator('H'))