[][src]Function dqcsim::bindings::dqcs_gate_name

#[no_mangle]pub extern "C" fn dqcs_gate_name(gate: dqcs_handle_t) -> *mut c_char

Returns the name of a custom gate.

This function fails if the gate is not a custom gate. Query dqcs_gate_has_name() to disambiguate between a non-custom gate and a different error.

On success, this returns a newly allocated string containing the gate name. Free it with free() when you're done with it to avoid memory leaks. On failure, this returns NULL.