Const
Creates a complex number from its real and imaginary parts. Uses caching for performance optimization.
Checks if a complex number is approximately zero within a given tolerance.
The complex number to check.
The numerical tolerance for the check. Defaults to 1e-10.
true
if the absolute value of the complex number is less than the tolerance.
Checks if two complex numbers are approximately equal within a given tolerance.
true
if the absolute difference between the numbers is less than the tolerance.
Creates a 2x2 unitary matrix from two quantum amplitudes and a global phase. The matrix is constructed as U = e^(iθ) * [[α, -β*], [β, α*]], where * denotes the complex conjugate, after normalizing α and β.
An object containing the unitary matrix and the normalized amplitudes.
Creates a 2x2 unitary matrix from two quantum amplitudes and a global phase. The matrix is constructed as U = e^(iθ) * [[α, -β*], [β, α*]], where * denotes the complex conjugate, after normalizing α and β.
An object containing the unitary matrix and the normalized amplitudes.
Type guard to check if a value is a valid Matrix. Validates that the input is a 2D array of Complex numbers.
Creates a validated Matrix from a 2D complex array. Ensures structural correctness without mathematical properties.
Converters for Qiskit (IBM Quantum).