[−][src]Function dqcsim::bindings::dqcs_mat_get
#[no_mangle]pub extern "C" fn dqcs_mat_get(mat: dqcs_handle_t) -> *mut c_double
Returns a copy of the contained matrix as a C array. >
If this function succeeds, the matrix is returned in row-major form, using pairs of doubles for the real vs. imaginary component of each entry. The size will be
4**num_qubits
complex numbers =2*4**num_qubits
doubles =16*4**num_qubits
bytes. A newly allocated matrix is returned; free it withfree()
when you're done with it to avoid memory leaks. On failure, this function returnsNULL
.