Skip to content

Mathematical functions support #2942

Description

@ikkoham

Required prerequisites

  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.

Describe the feature

Now we only supports acos and sqrt in C++.

double theta = 2. * std::acos(1. / std::sqrt(3));

This request would extend this to Python and also allow them to work (at least in our simulators).

  • asin, acos, atan
  • sin, cos, tan
  • sqrt
  • exp, log
  • ceiling, floor
  • mod
  • pop count

Clarification for Unitary Hack:
A good list of functions to implement that we will accept as submission for Unitary Hack is sin, cos, tan, asin, acos, atan, sqrt, exp, log, along with tests for both C++ and Python. Since this issue was filed, we have updated to LLVM 22 and these functions should directly leverage the corresponding instructions.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions