QuantumInfo.Finite.Braket
49 declarations
Bra notation
#term〈_∣The notation represents a linear functional, referred to as a "bra" vector, which is the dual of a state vector . In the context of finite-dimensional quantum mechanics, this operator maps elements of a Hilbert space to the complex numbers .
Ket notation for pure states
#term∣_〉Let be a finite index set. For an element that can be interpreted as a vector in , the notation denotes the corresponding quantum state (ket) in the space of pure states `Ket d`. This notation acts as a coercion or constructor that treats a vector-like object as a ket in the specified finite-dimensional Hilbert space.
Function-like coercion for kets
#instFunLikeKetLet be a finite index set. The type of kets `Ket d`, which represents pure quantum states as vectors in , is endowed with a `FunLike` instance. This allows a ket to be treated as a function from the index set to the complex numbers , where the value at an index is the -th component of the underlying vector .
Function Evaluation of Ket Equals its Vector Representation
#coe_fun_eqFor any quantum state vector (ket) in a finite-dimensional Hilbert space with basis , the evaluation of as a function from the basis to the complex numbers is equivalent to its underlying vector representation .
Function-like coercion for bras
#instFunLikeBraLet be a finite index set. The type of bras `Bra d`, which represents the dual vectors (row vectors) in the finite-dimensional Hilbert space , is endowed with a `FunLike` instance. This allows a bra to be treated as a function mapping each index to a complex number . Specifically, for any bra , the value at index is defined by the -th component of its underlying vector representation . The mapping is injective, meaning two bras are equal if and only if their vector components are identical.
Function Evaluation of Bra Equals its Vector Representation
#coe_fun_eqFor any quantum state covector (bra) in a finite-dimensional Hilbert space with basis , the evaluation of as a function from the basis to the complex numbers is equivalent to its underlying vector representation .
The inner product of a bra and a ket
#dotGiven a finite index set , a bra and a ket are represented as vectors in . The dot product is defined as the sum over the index set of the product of their components: where and denote the -th components of the bra and ket respectively.
Braket notation for the inner product of a bra and a ket
#term〈_‖_〉Given a bra vector and a ket vector , the notation represents their inner product (or "bracket"), which is a complex number in . This is defined by applying the dot product function to the vectors and .
equals the dot product of and
#dot_eq_dotProductLet be a finite index set. For a bra and a ket , the bracket (inner product) is equal to the standard dot product of their underlying vectors, denoted as .
Component-wise evaluation of kets
#applyLet be a finite index set and be a ket in . For any index , the value of the ket when treated as a function at , denoted , is equal to the -th component of its underlying vector .
Components of Bra are equal to the components of its vector representation
#applyLet be a finite index set and be a dual vector in the bra representation (an element of ). For any index , the value of the function applied to is equal to the component of its underlying vector at index . In other words, .
Extensionality of Kets ()
#extLet and be quantum states in the ket representation (elements of type `Ket d`). If for every index , the components of the states are equal, i.e., , then the states themselves are equal, .
Extensionality of dual vectors (bras) in
#extLet be a finite index set representing the dimension of the Hilbert space. For any dual vectors (bras) , if for all basis indices , the components are equal (i.e., ), then the dual vectors themselves are equal ().
The squared components of a ket sum to 1
#normalizedFor any quantum state represented as a ket in a finite-dimensional space indexed by , the sum of the squared norms of its components over all indices is equal to , i.e., .
Normalization Condition for Bras in
#normalizedLet be a finite index set representing the dimensions of a Hilbert space, and let be a dual vector (bra). The sum over all basis indices of the squared norm of the components is equal to 1.
Mapping a ket to its conjugate bra
#to_braGiven a finite index set , any ket (represented as a vector in ) can be mapped to its corresponding bra . This transformation is defined by taking the complex conjugate of each element of the vector: for all .
Conversion of a bra to a ket via conjugation
#to_ketGiven a bra vector in a -dimensional Hilbert space (represented as a function satisfying a normalization condition), the function `Bra.to_ket` maps it to its corresponding ket vector by taking the complex conjugate of each component, such that .
Coercion from to
#instBraOfKetAn instance of the coercion operator from the space of ket vectors (represented as column vectors) to the space of bra vectors (represented as row vectors/linear functionals). This coercion is defined by the mapping `Ket.to_bra`, which corresponds to the conjugate transpose operation .
Coercion from to
#instKetOfBraAn instance of the coercion operator from the space of bra vectors to the space of ket vectors , defined by the correspondence between a linear functional and its dual vector (specifically using the `Bra.to_ket` map).
Components of Bra are Complex Conjugates of Ket Components
#apply'Let be a ket vector in a finite-dimensional Hilbert space indexed by . For any index , the evaluation of the corresponding bra vector at is equal to the complex conjugate of the -th component of the ket's underlying vector, denoted as .
for any normalized ket
#exists_ne_zeroFor any normalized ket in a finite-dimensional Hilbert space (represented as a vector in where is a finite index set), there exists at least one index such that the component is non-zero.
A Normalized Bra is Non-Zero at Some Index
#exists_ne_zeroLet be a normalized bra vector in a finite-dimensional Hilbert space (represented as a function from a finite index set to the complex numbers ). There exists at least one index such that the component is non-zero.
Normalization of a vector to a Ket
#normalizeGiven a finite set , a vector , and a proof that is not the zero vector (i.e., there exists some such that ), this function constructs a normalized ket . The components of the resulting vector are defined as: where the denominator is the -norm . The definition ensures the resulting vector has unit norm, .
Normalization of the vector of a ket equals
#normalize_ket_eq_selfLet be a ket (a normalized vector in ). If we take the underlying vector and apply the normalization function `Ket.normalize` (using the fact that is non-zero), the resulting ket is equal to the original . Specifically, for any , , where is the proof that has at least one non-zero component.
Normalization of a vector to a Bra
#normalizeGiven a finite indexing set and a vector such that has at least one non-zero component (), the normalization function produces a bra (row vector) by scaling by the reciprocal of its -norm. Specifically, the resulting vector is defined by for each . This construction ensures that the resulting bra satisfies the normalization condition .
Normalizing the vector of a bra returns
#normalize_ket_eq_selfFor any normalized row vector (bra) in a -dimensional Hilbert space, normalizing its underlying vector results in the original bra itself. Here, is the raw vector representation of the bra, and the normalization process involves dividing the vector by its -norm.
Uniform superposition state
#uniform_superpositionGiven a finite indexing set that is non-empty, the uniform superposition state is defined as the normalization of a vector where every component is . Specifically, it is the Ket defined by the components: for all , where denotes the cardinality of the set . This state represents a coherent superposition of all basis elements with equal probability amplitudes.
Default Ket as the uniform superposition
#instInhabitedFor any non-empty finite index set , there exists a default instance of a "Ket" vector in the Hilbert space. This default ket is defined as the uniform superposition state: where is the cardinality of the set and are the computational basis vectors.
Computational basis vector
#basisGiven a finite type , the function constructs a "Ket" vector in the Hilbert space corresponding to a basis element . Representing the state as a function , it is defined as the Kronecker delta , which takes the value when and otherwise.
Computational basis vector
#basisGiven a finite index set , for any element , the function constructs the corresponding basis "Bra" vector . It is defined as a linear functional on the space of "Kets" (represented as functions ), such that when applied to a basis element , it yields if and otherwise.
Function-like interpretation of Bra
#instFunLikeBraketFor a finite index set , any Bra vector in the dual space can be treated as a function mapping a Ket vector to a complex number . This mapping is defined by the inner product (or braket) . The implementation ensures that a Bra is uniquely determined by its action on all Ket vectors.
for any state
#dot_self_eq_oneLet be a finite index set and be a ket in representing a normalized quantum pure state. The inner product of the state with itself, denoted by , is equal to .
Outer Product of two kets and
#prodGiven two kets and representing pure quantum states in finite-dimensional Hilbert spaces indexed by and respectively, their product is a ket in the tensor product space indexed by . The components of the resulting vector are defined by the product of the individual components, i.e., for all . This construction creates an unentangled (separable) state.
Tensor product notation for kets
#term_⊗ᵠ_This is a notation definition for the tensor product of two quantum ket states. For two kets of dimension and of dimension , the notation represents the combined state in the tensor product Hilbert space of dimension , computed via the `Ket.prod` function.
is a product state
#IsProdA quantum state (ket) in the composite Hilbert space (representing the tensor product ) is a product state if there exist states and such that .
is an entangled state
#IsEntangledA state vector (ket) in the tensor product space is said to be entangled if it cannot be expressed as a product state (i.e., it is not a decomposable tensor for some and ).
The tensor product of two kets is a product state.
#IsProd_prodLet and be two quantum states (kets) in Hilbert spaces of dimensions and , respectively. Then their tensor product (denoted `ψ₁.prod ψ₂`) is a product state.
A product of two kets is not entangled
#not_IsEntangled_prodFor any two quantum states in a Hilbert space of dimension and in a Hilbert space of dimension , their tensor product state is not an entangled state.
is a product state
#IsProd_iff_mul_eq_mulLet and be finite index sets, and let be a ket in the tensor product space . Then is a product state if and only if for all indices and , the components of the ket satisfy the cross-multiplicativity condition:
Maximally entangled state on
#MESLet be a finite non-empty type. The maximally entangled state (MES) on the system is a state vector (ket) whose components are given by: where denotes the cardinality of . This state corresponds to a normalized superposition of basis states with all-positive phases. In the specific case where has size 2, this definition yields the standard Bell state .
The maximally entangled state is entangled for
#MES_isEntangledLet be a type representing a finite-dimensional Hilbert space basis. If is nontrivial (meaning the dimension of the space is at least ), then the maximally entangled state `MES` in the tensor product space is entangled.
The Transpose Trick:
#transposeTrickLet be a finite non-empty type representing the basis of a Hilbert space. For any matrix , the following identity holds when acting on the vector representation of the maximally entangled state : where is the identity matrix, denotes the Kronecker product (), denotes the transpose of , and is the maximally entangled state `Ket.MES d`.
Equivalence relation of kets up to a global phase
#PhaseEquivLet `Ket d` be the type of quantum state vectors (kets) in a system with basis . The relation `Ket.PhaseEquiv` is defined as a setoid (equivalence relation) on `Ket d`, where two kets and are equivalent if there exists a complex number such that and the state vectors satisfy . Mathematically, this captures the notion that two quantum states are equivalent if they differ only by a global phase.
Quantum pure states as kets up to a global phase
#KetUpToPhaseLet be a type representing the dimensions of a finite-dimensional Hilbert space. The type is defined as the quotient of the space of kets by the equivalence relation . This relation identifies two kets if they differ only by a global phase factor . This represents the space of pure quantum states, where physical observables are invariant under such phase transformations.
The canonical projection from a to a quantum state
#mkLet be a ket in the space . The function maps the ket to its corresponding equivalence class in the quotient space . This quotient space represents pure quantum states where kets are identified if they differ only by a global phase factor .
Lifting a phase-invariant function from to
#liftLet be the type of quantum state vectors (kets) and be the quotient space defined by the phase equivalence relation , where if there exists with such that . Given a function and a proof that is phase-invariant (i.e., ), the function `KetUpToPhase.lift` returns the induced function .
The lift of a phase-invariant function applied to the class equals
#lift_mkLet be the set of finite-dimensional quantum state vectors (kets). Let be the quotient of by the phase equivalence relation (where if they differ only by a complex phase). For any function that is invariant under phase changes (i.e., whenever ), let be the function induced by on the quotient space. Then for any ket , the value of applied to the equivalence class is equal to .
Induction Principle for Quantum States up to a Phase
#indLet be the space of quantum pure states, defined as the quotient of kets by the global phase equivalence relation. Let be a property (predicate) defined on . If holds for every ket (where denotes the equivalence class of ), then holds for every state .
The Quotient Map from Kets to Phase-Equivalent States is Surjective
#surjective_mkThe quotient map , which maps a quantum state vector to its equivalence class under global phase, is a surjective function. That is, every pure quantum state in can be represented by at least one ket .
