diff --git a/contrib/runtime/aer_runtime.cpp b/contrib/runtime/aer_runtime.cpp index 2a4d65cc2f..0f8685b84e 100644 --- a/contrib/runtime/aer_runtime.cpp +++ b/contrib/runtime/aer_runtime.cpp @@ -76,6 +76,13 @@ complex_t *aer_release_statevector(void *handler) { return sv.move_to_buffer(); }; +// u3 gate +void aer_apply_u3(void *handler, uint_t qubit, double theta, double phi, + double lambda) { + AER::AerState *state = reinterpret_cast(handler); + state->apply_u(qubit, theta, phi, lambda); +} + // phase gate void aer_apply_p(void *handler, uint_t qubit, double lambda) { AER::AerState *state = reinterpret_cast(handler); diff --git a/contrib/runtime/aer_runtime_api.h b/contrib/runtime/aer_runtime_api.h index 2e27a6fcc0..6d707e8db4 100644 --- a/contrib/runtime/aer_runtime_api.h +++ b/contrib/runtime/aer_runtime_api.h @@ -45,6 +45,9 @@ double complex aer_amplitude(void* state, uint_t outcome); // returned pointer must be freed in the caller double complex* aer_release_statevector(void* state); +// u3 gate +void aer_apply_u3(void* state, uint_t qubit, double theta, double phi, double lambda); + // phase gate void aer_apply_p(void* state, uint_t qubit, double lambda); diff --git a/releasenotes/notes/support_u3_runtime_api-42f013f111c319ff.yaml b/releasenotes/notes/support_u3_runtime_api-42f013f111c319ff.yaml new file mode 100644 index 0000000000..72dec64c0b --- /dev/null +++ b/releasenotes/notes/support_u3_runtime_api-42f013f111c319ff.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + `aer_apply_u3` is added to `aer_runtime_api.h`