-
Notifications
You must be signed in to change notification settings - Fork 58
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
Bugfix: QPU qubit overflow #108
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #108 +/- ##
==========================================
- Coverage 87.30% 87.01% -0.29%
==========================================
Files 67 67
Lines 8924 9006 +82
==========================================
+ Hits 7791 7837 +46
- Misses 1133 1169 +36
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Comments on PyQuil Backend: The backend does not fail silently like the others when a larger circuit is specified than is supported by the actual QPU. Additional Comments: |
Description
Added
n_qubits
attribute toDeviceQiskit
that extracts the maximum number of qubits compatible for the particular IBMQ Backend selectedAdded qubit number check between
CircuitParams
Object andDeviceQiskit
. An Exception is raised if the number of qubits in the backend is less than the number of qubits required to create the circuit.Updated unittests in test_qiskit_qpu.py
Added
n_qubits
attribute toDeviceAWS
that extracts the maximum number of qubits compatible for the particular Braket Backend selected. (Since not all backends may have the total number of qubits available, a function that catches the possibility that the number of qubits is not available is added for this Device object.)Added qubit number check between
CircuitParams
Object andDeviceAWS
. Exception is raised as above.Updated unittests in test_braket_qpu.py
Added
n_qubits
attribute toDevicePyQuil
that extracts the maximum number of qubits compatible for the particular PyQuil QPU Backend selected.Added qubit number check between
CircuitParams
Object andDevicePyquil
. Exception is raised as above.The above resolves PR Unintended behaviour/error-catching bug when using workflows with IBM backend #105
Updated Exception catching in
OptimizeVQA
should help prevent silent crashes.Updated unittests to check for silent errors.
Minor changes to
OptimizeVQA
soptimize
method. (Return is moved outside of the try/except/finally loop. If it is within the finally tab, the exception we want is not raised.) This resolves PR Optimize function crashes silently #132Renamed
test_optimisers.py
totest_optimizers.py
Checklist
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Name the new unit-tests that you have added along with this change.
test_all.py