Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly clarify that
AllocateQubits(N)
returns a vector from 0 t…
…o N-1 in documentation (#1523) **Context:** In [the documentation for adding a custom device](https://docs.pennylane.ai/projects/catalyst/en/stable/dev/custom_devices.html), it should be specified that the `AllocateQubits` method of a custom device should return a vector from 0 to `num_qubits-1`. Right now the documentation makes it seem like it can just return a vector initialized with all zeros (or whatever that particular machine's cpp default initializes vectors to). This can lead to confusion for external device implementors following the guide. For example, if the vector is initialized with all zeros, this would lead to the implementor finding `__catalyst__rt__array_get_element_ptr_1d` always returning zero regardless of the target wire. **Description of the Change:** Explicitly clarify that `AllocateQubits(N)` returns a vector from 0 to N-1 in documentation, by 1. Doing so in the code listing 2. Adding a warning in documentation **Benefits:** Better documentation. **Related GitHub Issues:** closes #1512 [sc-84327]
- Loading branch information