This PR introduces tests verifying that our decompositions of circuits using Rigetti-native gateset are actually correct. The tests run the circuits in verbatim mode on the actual QPU and fail if any circuits fail to run.
Additionally, this PR removes deprecated calls to as_unitary(), which luckily fixes qubit ordering, so we no longer need basis change in tests.
Notice that to run tests on actual Rigetti QPU you need to have AWS CLI configured for use with Braket. Since we can't do this now, these tests are disabled on the CI. They can be run locally by adding --rigetti flag to pytest, e.g.
pytest tests --rigetti
I have run the tests locally and all the circuits indeed work. The cost of running tests with --rigetti flag only is below $1.50.
Also, be mindful that Rigetti QPUs are only available for several hours daily. If you run tests outside those Hours, or they fail to finish on time, the following will happen:
the tasks will be queued
the tests will synchronously wait for the tasks to finish.
Always consult the Amazon Braket dashboard to verify when a given device is accessible to avoid the hang-up described above.
This PR introduces tests verifying that our decompositions of circuits using Rigetti-native gateset are actually correct. The tests run the circuits in verbatim mode on the actual QPU and fail if any circuits fail to run.
Additionally, this PR removes deprecated calls to
as_unitary()
, which luckily fixes qubit ordering, so we no longer need basis change in tests.Notice that to run tests on actual Rigetti QPU you need to have AWS CLI configured for use with Braket. Since we can't do this now, these tests are disabled on the CI. They can be run locally by adding
--rigetti
flag to pytest, e.g.I have run the tests locally and all the circuits indeed work. The cost of running tests with
--rigetti
flag only is below $1.50.Also, be mindful that Rigetti QPUs are only available for several hours daily. If you run tests outside those Hours, or they fail to finish on time, the following will happen:
Always consult the Amazon Braket dashboard to verify when a given device is accessible to avoid the hang-up described above.