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

All Samples(20)  |  Call(17)  |  Derive(0)  |  Import(3)
General Hermitian conjugate operation.

Take the Hermetian conjugate of an argument [1]_. For matrices this
operation is equivalent to transpose and complex conjugate [2]_.

Parameters
==========

arg : Expr
    The sympy expression that we want to take the dagger of.(more...)

src/s/y/sympy-HEAD/sympy/physics/quantum/tests/test_gate.py   sympy(Download)
from sympy.physics.quantum.matrixutils import matrix_to_zero
from sympy.physics.quantum.matrixcache import sqrt2_inv
from sympy.physics.quantum import Dagger
 
 
 
    # Test that the dagger, inverse, and power of CGate is evaluated properly
    assert Dagger(CZGate) == CZGate
    assert pow(CZGate, 1) == Dagger(CZGate)
    assert Dagger(CZGate) == CZGate.inverse()
    assert Dagger(CPhaseGate) != CPhaseGate

src/s/y/sympy-HEAD/sympy/physics/quantum/tests/test_sho1d.py   sympy(Download)
"""Tests for sho1d.py"""
 
from sympy import Integer, Symbol, sqrt, I, S
from sympy.physics.quantum import Dagger
from sympy.physics.quantum.constants import hbar
def test_RaisingOp():
    assert Dagger(ad) == a
    assert Commutator(ad, a).doit() == Integer(-1)
    assert Commutator(ad, N).doit() == Integer(-1)*ad
    assert qapply(ad*k) == (sqrt(k.n + 1)*SHOKet(k.n + 1)).expand()
def test_LoweringOp():
    assert Dagger(a) == ad
    assert Commutator(a, ad).doit() == Integer(1)
    assert Commutator(a, N).doit() == a
    assert qapply(a*k) == (sqrt(k.n)*SHOKet(k.n-Integer(1))).expand()

src/s/y/sympy-HEAD/sympy/physics/quantum/tests/test_cartesian.py   sympy(Download)
"""Tests for cartesian.py"""
 
from sympy import S, Interval, symbols, I, DiracDelta, exp, sqrt, pi
 
from sympy.physics.quantum import qapply, represent, L2, Dagger