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

[Stable] Fix test for MAC ARM and pin torch #803

Merged
merged 1 commit into from
May 15, 2024
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
3 changes: 2 additions & 1 deletion .github/actions/install-machine-learning/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
# (C) Copyright IBM 2021, 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand All @@ -17,6 +17,7 @@ runs:
using: "composite"
steps:
- run : |
pip install torch==2.2.2
pip install -e .[torch,sparse]
pip install -U -c constraints.txt -r requirements-dev.txt
shell: bash
6 changes: 3 additions & 3 deletions test/algorithms/regressors/test_qsvr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
# (C) Copyright IBM 2021, 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -51,7 +51,7 @@ def setUp(self):

def test_qsvr(self):
"""Test QSVR"""
qkernel = FidelityQuantumKernel(feature_map=self.feature_map)
qkernel = FidelityQuantumKernel(feature_map=self.feature_map, enforce_psd=False)

qsvr = QSVR(quantum_kernel=qkernel)
qsvr.fit(self.sample_train, self.label_train)
Expand All @@ -61,7 +61,7 @@ def test_qsvr(self):

def test_change_kernel(self):
"""Test QSVR with QuantumKernel later"""
qkernel = FidelityQuantumKernel(feature_map=self.feature_map)
qkernel = FidelityQuantumKernel(feature_map=self.feature_map, enforce_psd=False)

qsvr = QSVR()
qsvr.quantum_kernel = qkernel
Expand Down
Loading