[][src]Function dqcsim::bindings::dqcs_mat_predef

#[no_mangle]pub extern "C" fn dqcs_mat_predef(
    gate_type: dqcs_predefined_gate_t,
    param_data: dqcs_handle_t
) -> dqcs_handle_t

Constructs a new gate matrix for one of DQCsim's predefined gates. >

gate_type specifies which kind of gate should be constructed.

param_data takes an optional ArbData object used to parameterize the matrix if necessary. If not specified, an empty object is used. The ArbData representation for each gate can be found in the docs for dqcs_predefined_gate_t. If nothing is specified, no ArbData is used.

This function returns the handle to the matrix, or 0 to indicate failure. The parameterization data (if specified) is consumed/deleted by this function if and only if it succeeds.