[−][src]Function dqcsim::bindings::dqcs_plugin_allocate
#[no_mangle]pub extern "C" fn dqcs_plugin_allocate(
plugin: dqcs_plugin_state_t,
num_qubits: usize,
cq: dqcs_handle_t
) -> dqcs_handle_t
Allocate the given number of downstream qubits.
Backend plugins are not allowed to call this. Doing so will result in an error.
num_qubits
specifies the number of qubits that are to be allocated.
commands
must be 0 or a valid handle to an ArbCmd
queue, containing a
list of commands that may be used to modify the behavior of the qubit
register; 0 is equivalent to zero commands. The queue is consumed by this
function, i.e. the handle becomes invalid, if and only if it succeeds.
If the function is successful, a new handle to the set of qubit references representing the newly allocated register is returned. When the function fails, 0 is returned.