Skip to main content

kron

Overloads​

NameDescription
kron(const Fbit left_Fbit, const Fbit right_Fbit) -> FbitReturns the tensor product of two fermionic product states.
kron(const Qbit left_Qbit, const Qbit right_Qbit) -> QbitReturns the tensor product of two qubit product states.

kron(const Fbit left_Fbit, const Fbit right_Fbit) -> Fbit​

Returns the tensor product of two fermionic product states.

Parameters​

  • left_Fbit: The fermionic product state appearing on the left.
  • right_Fbit: The fermionic product state appearing on the right.

Example​

Fbit("00").kron(Fbit("11",2.0)) // Returns (2 + 0i)|0011>

kron(const Qbit left_Qbit, const Qbit right_Qbit) -> Qbit​

Returns the tensor product of two qubit product states.

Parameters​

  • left_Qbit: The qubit product state appearing on the left.
  • right_Qbit: The qubit product state appearing on the right.

Example​

Qbit("00").kron(Qbit("11",2.0)) // Returns (2 + 0i)|0011>