[][src]Function dqcsim::bindings::dqcs_mat_add_controls

#[no_mangle]pub extern "C" fn dqcs_mat_add_controls(
    mat: dqcs_handle_t,
    number_of_controls: size_t
) -> dqcs_handle_t

Constructs a controlled matrix from the given matrix. >

mat specifies the matrix to use as the non-controlled submatrix. This is a borrowed handle. number_of_controls specifies the number of control qubits to add. This function returns a new matrix handle with the constructed matrix, or 0 if it fails.