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

feat: update to qiskit 1.3 #57

Merged
merged 3 commits into from
Dec 19, 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
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
gschurck marked this conversation as resolved.
Show resolved Hide resolved
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: ["macOS-latest"]
steps:
- uses: actions/checkout@v3
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: ["windows-latest"]
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "qiskit_alice_bob_provider"
authors = [
{name = "Alice & Bob Software Team"},
]
version = "1.0.1"
version = "1.1.0"
description = "Provider for running Qiskit circuits on Alice & Bob QPUs and simulators"
readme = "README.md"
license = {text = "Apache 2.0"}
Expand All @@ -21,22 +21,20 @@ classifiers=[
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Physics",
]
urls = {Homepage = "https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider", "Alice & Bob" = "https://alice-bob.com/"}
requires-python = ">=3.8, <3.13"
requires-python = ">=3.9, <3.13"
dependencies = [
"ipython",
"ipywidgets",
"pydantic>=2.0",
"requests>=1.26",
# Qiskit version is pinned because substitute_node_with_dag function is patched to make custom instructions work.
"qiskit==1.2.4",
"qiskit==1.3.1",
"qiskit-aer<0.16.0",
"qiskit-qir-alice-bob-fork==0.5.0rc0",
"tenacity"
Expand Down
15 changes: 0 additions & 15 deletions qiskit_alice_bob_provider/custom_instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
from qiskit.circuit import Instruction, InstructionSet, QuantumCircuit, Reset
from qiskit.circuit.equivalence_library import SessionEquivalenceLibrary
from qiskit.circuit.quantumcircuit import ClbitSpecifier, QubitSpecifier
from qiskit.dagcircuit import DAGCircuit

from qiskit_alice_bob_provider.local.patch.substitute_node_with_dag import (
substitute_node_with_dag,
)


class MeasureX(Instruction):
Expand Down Expand Up @@ -65,13 +60,3 @@ def _measure_x(
_c = QuantumCircuit(1, 0)
_c.initialize('0', 0) # pylint: disable=no-member
SessionEquivalenceLibrary.add_equivalence(Reset(), _c)


# The function substitute_node_with_dag is patched to make the custom measure_x
# instruction work with Qiskit 1.2.
# It adds the else statement that was removed on lines 1610-1611
# in dagcircuit.py in this commit :
# https://github.com/Qiskit/qiskit/commit/353b0ea6bdd907e801ad8fa264f3444e0be942aa#diff-4fb31a3ade5ae57cfd91ea00dbf3c5b6ab066a8234a742d91f9c09a09edca2f7L1610-L1611
# This function will be moved to Rust in Qiskit version 1.3
# so we will have to find another solution.
DAGCircuit.substitute_node_with_dag = substitute_node_with_dag
307 changes: 0 additions & 307 deletions qiskit_alice_bob_provider/local/patch/substitute_node_with_dag.py

This file was deleted.

Loading
Loading