Function Pennylane::Util::maxDecimalForQubit

Function Documentation

inline auto Pennylane::Util::maxDecimalForQubit(size_t qubitIndex, size_t qubits) -> size_t

Calculates the decimal value for a qubit, assuming a big-endian convention.

Parameters
  • qubitIndex – the index of the qubit in the range [0, qubits)

  • qubits – the number of qubits in the circuit

Returns

decimal value for the qubit at specified index