prob#
- diffqc.prob(state: ~jax.Array, dtype: ~numpy.dtype = <class 'jax.numpy.float32'>) Array #
Calculate probabilities for n-qubit state
- Parameters
state (1d jnp.ndarray) – n-qubit state e.g.
[|000>, |001>, |010>, ..., |111>]
dtype (jnp.dtype) – dtype of probabilities. Default is jnp.float32.
- Returns
Probabilities
- Return type
jnp.ndarray