Skip to content

Additional support for qubit array allocation #2714

Description

@ColbyDeLisle

Wanting to gauge interest in adding Q# support for the __quantum__rt__qubit_allocate_array QIR function.

I think it could be useful in particular for the Backend trait to be extended so that it's able to distinguish between a user allocating single qubits (via use q = Qubit(); in Q#) and them allocating an array of qubits all at once (via use qs = Qubit[10];).

Currently a qubit array allocation is treated as a sequence of calls to the single qubit allocation instruction (this is done here), and Backend in turn has just one function for handling allocation of single qubits at a time. But it seems reasonable to treat __quantum__rt__qubit_allocate_array as its own intrinsic, and add another function to Backend which handles it separately from __quantum__rt__qubit_allocate.

Happy to chat more or pitch in as needed. Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions