qat.mps.random_circuits.random_observable

qat.mps.random_circuits.random_observable(nqbits: int, nterms: int) Observable

Generate a random observable for given number of qubits and containing a specific number of terms.

Parameters
  • nqbits (int) – Number of qubits of the random observable.

  • nterms (int) – Number of terms the observable should contain.

Returns

Random observable.

Return type

Observable

Note

This method is available as an application in Qaptiva Access.