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

Temporary upper bound on JAX version <=0.4.6 #210

Merged
merged 3 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions docs/tutorials/dynamics_backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ To enable running of the single qubit experiments, we add the following to the `
backend.
- Add definitions of ``RZ`` gates as phase shifts. These instructions control the phase of the drive
channels, as well as any control channels acting on a given qubit.
- Add a ``CX`` gate which applies to all qubits. While this tutorial will not be utilizing it, this
ensures that validation steps checking that the device is fully connected will pass.
- Add a ``CX`` gate between qubits :math:`(0, 1)` and :math:`(1, 0)`. While this tutorial will not
be utilizing it, this ensures that validation steps checking that the device is fully connected
will pass.

.. jupyter-execute::

Expand All @@ -336,7 +337,7 @@ To enable running of the single qubit experiments, we add the following to the `
target.add_instruction(XGate(), properties={(0,): None, (1,): None})
target.add_instruction(SXGate(), properties={(0,): None, (1,): None})

target.add_instruction(CXGate())
target.add_instruction(CXGate(), properties={(0, 1): None, (1, 0): None})

# Add RZ instruction as phase shift for drag cal
phi = Parameter("phi")
Expand Down Expand Up @@ -472,11 +473,6 @@ values for the single qubit gates calibrated above.

from qiskit_experiments.library import CrossResonanceHamiltonian

backend.target.add_instruction(
instruction=CrossResonanceHamiltonian.CRPulseGate(width=Parameter("width")),
properties={(0, 1): None, (1, 0): None}
)

cr_ham_experiment = CrossResonanceHamiltonian(
qubits=(0, 1),
flat_top_widths=np.linspace(0, 5000, 17),
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"multiset>=3.0.1",
]

jax_extras = ['jax>=0.2.26',
'jaxlib>=0.1.75']
jax_extras = ['jax>=0.2.26, <= 0.4.6',
'jaxlib>=0.1.75, <= 0.4.6']

PACKAGES = setuptools.find_packages(exclude=['test*'])

Expand Down
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ commands = stestr run {posargs}
[testenv:jax]
deps =
-r{toxinidir}/requirements-dev.txt
jax
jaxlib
jax<=0.4.6
jaxlib<=0.4.6
diffrax

[testenv:lint]
deps =
-r{toxinidir}/requirements-dev.txt
jax
jaxlib
jax<=0.4.6
jaxlib<=0.4.6
diffrax
commands =
black --check {posargs} qiskit_dynamics test
Expand All @@ -37,8 +37,8 @@ commands = black {posargs} qiskit_dynamics test
[testenv:docs]
deps =
-r{toxinidir}/requirements-dev.txt
jax
jaxlib
jax<=0.4.6
jaxlib<=0.4.6
diffrax
commands =
sphinx-build -b html -W {posargs} docs/ docs/_build/html
Expand Down