API Reference¶
Functions¶
|
Generates the vector representation of a Fock state. |
|
Generates coherent state with eigenvalue alpha by displacing the vacuum state by a displacement parameter alpha. |
Creation (raising) operator. |
|
|
Returns conjugate transpose of a given state, represented by \(A^{\dagger}\), where \(A\) is a quantum state represented by a ket, a bra or, more generally, a density matrix. |
Destruction (lowering or annihilation) operator. |
|
|
Calculates the expectation value of an operator with respect to an input state. |
|
Computes fidelity between two states (pure or mixed). |
|
Checks whether a state is a bra based on its shape. |
|
Checks whether a given matrix is a valid density matrix. |
|
Checks whether a given operator is Hermitian. |
|
Checks whether a state is a ket based on its shape. |
|
Returns an \(N \times N\) randomly parametrized unitary |
|
Returns a random \(N\)-dimensional ket. |
|
Returns a random \(N \times N\)-dimensional density matrix. |
Returns a Pauli-X operator. |
|
Returns a Pauli-Y operator. |
|
Returns a Pauli-Y operator. |
|
|
Single-mode squeezing operator. |
|
Converts a ket or a bra into its density matrix representation using the outer product \(|x\rangle \langle x|\). |
Classes¶
Displacement operator for optical phase space. |
|
Class for an \(N \times N\) parametrized unitary matrix \(U(N)\) |