CreateMatrix#

diffqc.util.CreateMatrix(op, nqubits: int, dtype: dtype, f: Callable[[Array], Array]) Array#

Create Transition Matrix from function

Parameters
  • opdense or sparse

  • nqubits (int) – Number of qubits

  • dtype (jnp.dtype) – dtype

  • f (Callable[[jnp.ndarray], jnp.ndarray]) –

Returns

Transition Matrix

Return type

jnp.ndarray