qnet.algebra.core package¶
The fundamental object hiearchies that constitute QNET’s various algebras
Submodules:
- qnet.algebra.core.abstract_algebra module
- qnet.algebra.core.abstract_quantum_algebra module
- qnet.algebra.core.algebraic_properties module
- qnet.algebra.core.circuit_algebra module
- qnet.algebra.core.exceptions module
- qnet.algebra.core.hilbert_space_algebra module
- qnet.algebra.core.indexed_operations module
- qnet.algebra.core.matrix_algebra module
- qnet.algebra.core.operator_algebra module
- qnet.algebra.core.scalar_algebra module
- qnet.algebra.core.state_algebra module
- qnet.algebra.core.super_operator_algebra module
Summary¶
__all__
Exceptions:
AlgebraError |
Base class for all algebraic errors |
AlgebraException |
Base class for all algebraic exceptions |
BadLiouvillianError |
Raised when a Liouvillian is not of standard Lindblad form. |
BasisNotSetError |
Raised if the basis or a Hilbert space dimension is unavailable |
CannotConvertToSLH |
Raised when a circuit algebra object cannot be converted to SLH |
CannotEliminateAutomatically |
Raised when attempted automatic adiabatic elimination fails. |
CannotSimplify |
Raised when a rule cannot further simplify an expression |
CannotSymbolicallyDiagonalize |
Matrix cannot be diagonalized analytically. |
CannotVisualize |
Raised when a circuit cannot be visually represented. |
IncompatibleBlockStructures |
Raised for invalid block-decomposition |
InfiniteSumError |
Raised when expanding a sum into an infinite number of terms |
NoConjugateMatrix |
Raised when entries of Matrix have no defined conjugate |
NonSquareMatrix |
Raised when a Matrix fails to be square |
OverlappingSpaces |
Raised when objects fail to be in separate Hilbert spaces. |
SpaceTooLargeError |
Raised when objects fail to be have overlapping Hilbert spaces. |
UnequalSpaces |
Raised when objects fail to be in the same Hilbert space. |
WrongCDimError |
Raised for mismatched channel number in circuit series |
__all__
Classes:
Adjoint |
Symbolic Adjoint of an operator |
BasisKet |
Local basis state, identified by index or label |
Bra |
The associated dual/adjoint state for any ket |
BraKet |
The symbolic inner product between two states |
CPermutation |
Channel permuting circuit |
Circuit |
Base class for the circuit algebra elements |
CircuitSymbol |
Symbolic circuit element |
CoherentStateKet |
Local coherent state, labeled by a complex amplitude |
Commutator |
Commutator of two operators |
Component |
Base class for circuit components |
Concatenation |
Concatenation of circuit elements |
Expression |
Base class for all QNET Expressions |
Feedback |
Feedback on a single channel of a circuit |
HilbertSpace |
Base class for Hilbert spaces |
IndexedSum |
Base class for indexed sums |
KetBra |
Outer product of two states |
KetIndexedSum |
Indexed sum over Kets |
KetPlus |
Sum of states |
KetSymbol |
Symbolic state |
LocalKet |
A state on a LocalSpace |
LocalOperator |
Base class for “known” operators on a LocalSpace |
LocalSigma |
Level flip operator between two levels of a LocalSpace |
LocalSpace |
Hilbert space for a single degree of freedom. |
Matrix |
Matrix of Expressions |
NullSpaceProjector |
Projection operator onto the nullspace of its operand |
Operation |
Base class for “operations” |
Operator |
Base class for all quantum operators. |
OperatorDerivative |
Symbolic partial derivative of an operator |
OperatorIndexedSum |
Indexed sum over operators |
OperatorPlus |
Sum of Operators |
OperatorPlusMinusCC |
An operator plus or minus its complex conjugate |
OperatorSymbol |
Symbolic operator |
OperatorTimes |
Product of operators |
OperatorTimesKet |
Product of an operator and a state. |
OperatorTrace |
(Partial) trace of an operator |
ProductSpace |
Tensor product of local Hilbert spaces |
PseudoInverse |
Unevaluated pseudo-inverse \(\Op{X}^+\) of an operator \(\Op{X}\) |
QuantumAdjoint |
Base class for adjoints of quantum expressions |
QuantumDerivative |
Symbolic partial derivative |
QuantumExpression |
Base class for expressions associated with a Hilbert space |
QuantumIndexedSum |
Base class for indexed sums |
QuantumOperation |
Base class for operations on quantum expression |
QuantumPlus |
General implementation of addition of quantum expressions |
QuantumSymbol |
Symbolic element of an algebra |
QuantumTimes |
General implementation of product of quantum expressions |
SLH |
Element of the SLH algebra |
SPost |
Linear post-multiplication operator |
SPre |
Linear pre-multiplication operator |
Scalar |
Base class for Scalars |
ScalarDerivative |
Symbolic partial derivative of a scalar |
ScalarExpression |
Base class for scalars with non-scalar arguments |
ScalarIndexedSum |
Indexed sum over scalars |
ScalarPlus |
Sum of scalars |
ScalarPower |
A scalar raised to a power |
ScalarTimes |
Product of scalars |
ScalarTimesKet |
Product of a Scalar coefficient and a ket |
ScalarTimesOperator |
Product of a Scalar coefficient and an Operator |
ScalarTimesQuantumExpression |
Product of a Scalar and a QuantumExpression |
ScalarTimesSuperOperator |
Product of a Scalar coefficient and a SuperOperator |
ScalarValue |
Wrapper around a numeric or symbolic value |
SeriesInverse |
Symbolic series product inversion operation |
SeriesProduct |
The series product circuit operation. |
SingleQuantumOperation |
Base class for operations on a single quantum expression |
State |
Base class for states in a Hilbert space |
StateDerivative |
Symbolic partial derivative of a state |
SuperAdjoint |
Adjoint of a super-operator |
SuperOperator |
Base class for super-operators |
SuperOperatorDerivative |
Symbolic partial derivative of a super-operator |
SuperOperatorPlus |
A sum of super-operators |
SuperOperatorSymbol |
Symbolic super-operator |
SuperOperatorTimes |
Product of super-operators |
SuperOperatorTimesOperator |
Application of a super-operator to an operator |
TensorKet |
A tensor product of kets |
__all__
Functions:
FB |
Wrapper for Feedback , defaulting to last channel |
KroneckerDelta |
Kronecker delta symbol |
LocalProjector |
A projector onto a specific level of a LocalSpace |
Sum |
Instantiator for an arbitrary indexed sum. |
adjoint |
Return the adjoint of an obj. |
anti_commutator |
If B != None , return the anti-commutator \(\{A,B\}\), otherwise return the super-operator \(\{A,\cdot\}\). |
block_matrix |
Generate the operator matrix with quadrants |
circuit_identity |
Return the circuit identity for n channels |
commutator |
Commutator of A and B |
decompose_space |
Simplifies OperatorTrace expressions over tensor-product spaces by turning it into iterated partial traces. |
diagm |
Generalizes the diagonal matrix creation capabilities of numpy.diag to Matrix objects. |
eval_adiabatic_limit |
Compute the limiting SLH model for the adiabatic approximation |
extract_channel |
Create a CPermutation that extracts channel k |
factor_coeff |
Factor out coefficients of all factors. |
factor_for_trace |
Given a LocalSpace ls to take the partial trace over and an operator op, factor the trace such that operators acting on disjoint degrees of freedom are pulled out of the trace.If the operator acts trivially on ls the trace yields only a pre-factor equal to the dimension of ls.If there are LocalSigma operators among a product, the trace’s cyclical property is used to move to sandwich the full product by LocalSigma operators:. |
getABCD |
Calculate the ABCD-linearization of an SLH model |
get_coeffs |
Create a dictionary with all Operator terms of the expression (understood as a sum) as keys and their coefficients as values. |
hstackm |
Generalizes numpy.hstack to Matrix objects. |
identity_matrix |
Generate the N-dimensional identity matrix. |
lindblad |
Return the super-operator Lindblad term of the Lindblad operator C |
liouvillian |
Return the Liouvillian super-operator associated with H and Ls |
liouvillian_normal_form |
Return a Hamilton operator H and a minimal list of collapse operators Ls that generate the liouvillian L . |
map_channels |
Create a CPermuation based on a dict of channel mappings |
move_drive_to_H |
Move coherent drives from the Lindblad operators to the Hamiltonian. |
pad_with_identity |
Pad a circuit by adding a n-channel identity circuit at index k |
prepare_adiabatic_limit |
Prepare the adiabatic elimination on an SLH object |
rewrite_with_operator_pm_cc |
Try to rewrite expr using OperatorPlusMinusCC |
sqrt |
Square root of a Scalar or scalar value |
substitute |
Substitute symbols or (sub-)expressions with the given replacements and re-evalute the result |
try_adiabatic_elimination |
Attempt to automatically do adiabatic elimination on an SLH object |
vstackm |
Generalizes numpy.vstack to Matrix objects. |
zerosm |
Generalizes numpy.zeros to Matrix objects. |
__all__
Data:
CIdentity |
Single pass-through channel; neutral element of SeriesProduct |
CircuitZero |
Zero circuit, the neutral element of Concatenation |
FullSpace |
The ‘full space’, i.e. |
II |
IdentityOperator constant (singleton) object. |
IdentityOperator |
IdentityOperator constant (singleton) object. |
IdentitySuperOperator |
Neutral element for product of super-operators |
One |
The neutral element with respect to scalar multiplication |
TrivialKet |
TrivialKet constant (singleton) object. |
TrivialSpace |
The ‘nullspace’, i.e. |
Zero |
The neutral element with respect to scalar addition |
ZeroKet |
ZeroKet constant (singleton) object for the null-state. |
ZeroOperator |
ZeroOperator constant (singleton) object. |
ZeroSuperOperator |
Neutral element for sum of super-operators |
tr |
Instantiate while applying automatic simplifications |