-
Notifications
You must be signed in to change notification settings - Fork 45
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
Support Qiskit 1.x #162
Support Qiskit 1.x #162
Conversation
LGTM at first pass. While I have a more thorough look in the coming days, can you ensure me that the notebooks run well top to bottom? |
Tests are failing due to incorrect implementation of MS gate in qiskit-ionq: qiskit-community/qiskit-ionq#162. Will be fixed by qiskit-community/qiskit-ionq#174. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments. I'll be fine if you decide to stick with your current implementation.
qiskit>=0.34.2, <1.0 | ||
qiskit-ionq>=0.4.7 | ||
qiskit>=0.34.2 | ||
# TODO: update to new minimum version >0.5.0 once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we write somewhere if there is anything we expect to change in our code when we switch to 0.5.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also a TODO in the relevant code:
qiskit-braket-provider/tests/providers/test_adapter.py
Lines 170 to 175 in 79f229a
# TODO: use compare_braket_qiskit_unitaries once | |
# MS gate implementation in qiskit-ionq has been corrected | |
np.allclose( | |
to_braket(qiskit_circuit).to_unitary(), | |
Operator(qiskit_circuit).to_matrix(), | |
) |
tests/providers/test_adapter.py
Outdated
@@ -91,6 +88,14 @@ | |||
] | |||
|
|||
|
|||
def compare_braket_qiskit_unitaries(qiskit_circuit: QuantumCircuit) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: if it is useful somewhere else, we could have compare_braket_qiskit_unitaries(braket_circuit, qiskit_circuit)
and call compare_braket_qiskit_unitaries(to_braket(qiskit_circuit), qiskit_circuit))
below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also consider calling it compare_unitaries
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be useful, but the point of this method is to check whether the converted circuit has the correct matrix; I'll rename the function accordingly.
Summary
Removes
qiskit<1.0
restriction and updates tests to use 1.x-compatible components.Details and comments