qalgebra.library.fock_operators module¶
Collection of operators that act on a bosonic Fock space
Summary¶
Classes:
Bosonic creation operator |
|
Bosonic annihilation operator |
|
Unitary coherent displacement operator. |
|
Unitary “phase” operator |
|
Unitary squeezing operator. |
Reference¶
-
class
qalgebra.library.fock_operators.
Destroy
(*, hs)[source]¶ Bases:
qalgebra.core.operator_algebra.LocalOperator
Bosonic annihilation operator
It obeys the bosonic commutation relation:
>>> Destroy(hs=1) * Create(hs=1) - Create(hs=1) * Destroy(hs=1) IdentityOperator >>> Destroy(hs=1) * Create(hs=2) - Create(hs=2) * Destroy(hs=1) ZeroOperator
-
property
identifier
¶ The identifier (symbol) that is used when printing the annihilation operator. This is identical to the identifier of
Create
. A custom identifier for bothDestroy
andCreate
can be set through the local_identifiers parameter of the associated Hilbert space:>>> hs_custom = LocalSpace(0, local_identifiers={'Destroy': 'b'}) >>> Create(hs=hs_custom).identifier 'b' >>> Destroy(hs=hs_custom).identifier 'b'
-
property
-
class
qalgebra.library.fock_operators.
Create
(*, hs)[source]¶ Bases:
qalgebra.core.operator_algebra.LocalOperator
Bosonic creation operator
This is the adjoint of
Destroy
.
-
class
qalgebra.library.fock_operators.
Phase
(*args, hs)[source]¶ Bases:
qalgebra.core.operator_algebra.LocalOperator
Unitary “phase” operator
\[\op{P}_{\rm hs}(\phi) = \exp\left(i \phi \Op{a}_{\rm hs}^\dagger \Op{a}_{\rm hs}\right)\]where \(a_{\rm hs}\) is the annihilation operator acting on the
LocalSpace
hs.- Parameters
phase (Scalar) – the phase \(\phi\)
hs (HilbertSpace or int or str) – The Hilbert space on which the operator acts
Printers should represent this operator with the default identifier:
>>> Phase._identifier 'Phase'
A custom identifier may be define using hs’s local_identifiers argument.
-
simplifications
= [<function implied_local_space.<locals>.kwargs_to_local_space>, <function match_replace>]¶
-
class
qalgebra.library.fock_operators.
Displace
(*args, hs)[source]¶ Bases:
qalgebra.core.operator_algebra.LocalOperator
Unitary coherent displacement operator.
\[\op{D}_{\rm hs}(\alpha) = \exp\left({\alpha \Op{a}_{\rm hs}^\dagger - \alpha^* \Op{a}_{\rm hs}}\right)\]where \(\Op{a}_{\rm hs}\) is the annihilation operator acting on the
LocalSpace
hs.- Parameters
displacement (Scalar) – the displacement amplitude \(\alpha\)
hs (HilbertSpace or int or str) – The Hilbert space on which the operator acts
Printers should represent this operator with the default identifier:
>>> Displace._identifier 'D'
A custom identifier may be define using hs’s local_identifiers argument.
-
simplifications
= [<function implied_local_space.<locals>.kwargs_to_local_space>, <function match_replace>]¶
-
class
qalgebra.library.fock_operators.
Squeeze
(*args, hs)[source]¶ Bases:
qalgebra.core.operator_algebra.LocalOperator
Unitary squeezing operator.
\[\Op{S}_{\rm hs}(\eta) = \exp {\left( \frac{\eta}{2} \left(\Op{a}_{\rm hs}^\dagger\right)^2 - \frac{\eta^*}{2} {\Op{a}_{\rm hs}}^2 \right)}\]where \(\Op{a}_{\rm hs}\) is the annihilation operator acting on the
LocalSpace
hs.- Parameters
squeezing_factor (Scalar) – the squeezing factor \(\eta\)
hs (HilbertSpace or int or str) – The Hilbert space on which the operator acts
Printers should represent this operator with the default identifier:
>>> Squeeze._identifier 'Squeeze'
A custom identifier may be define using hs’s local_identifiers argument.
-
simplifications
= [<function implied_local_space.<locals>.kwargs_to_local_space>, <function match_replace>]¶