Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for controlled-u3 gate #275

Closed
chriseclectic opened this issue Jul 9, 2019 · 3 comments · Fixed by #483
Closed

Add tests for controlled-u3 gate #275

chriseclectic opened this issue Jul 9, 2019 · 3 comments · Fixed by #483
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@chriseclectic
Copy link
Member

What is the expected behavior?

Add tests for controlled-u3 gate for qasm simulator (statevector), statevector simulator, unitary simulator.

NOTE: that there is an issue with how cu3 is currently defined in Terra (see Terra Issue 2703 / PR 2754), so that should be fixed before these tests are added.

Like other tests in the qasm simulator these should test for execution in the standard basis gates (which will include cu3 directly once the definition issue is resolved), the waltz basis gates (u1, u2, u3, cx), and the minimal basis gate set (cx, u3).

@chriseclectic chriseclectic added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed and removed enhancement New feature or request labels Jul 9, 2019
@newsma
Copy link

newsma commented Sep 20, 2019

@chriseclectic Could you give me more information about what it means to add tests for a gate? Do you just need to run qasm simulations with the backends mentioned for some controlled unitary and test how it works for the different set of basis gates?

@chriseclectic
Copy link
Member Author

Ideally the tests should run on all of the Aer simulation methods that support the gate and check it returns correct output.

For the cu3 gate at the moment this is the statevector method of the qasm simulator, the statevector simualtor, and the unitary simulator. For the last two you can check the actual unitary or output vector, but for the first one you will need ot use counts.

You can add it to the non_clifford reference library like for ccx gates here: https://github.com/Qiskit/qiskit-aer/blob/master/test/terra/reference/ref_non_clifford.py

@SatyaKuppam
Copy link

SatyaKuppam commented Oct 13, 2019

I can work on this. Can somebody tell me what the progress is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants