Skip to content

Update for Qiskit 1.0 #245

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This Changelog tracks all past changes to this project as well as details about
- `fixed` bug in Instruction where ideal gate's weren't properly set #229
- `fixed` wrong direction of rotations on bloch sphere #231
- `fixed` error is raised if optimizer gives OOB results #235
- `changed` Qiskit version to >= 1.0

## Version `1.4` - 23 Dec 2021

Expand Down
2 changes: 1 addition & 1 deletion c3/qiskit/c3_gates.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Library for interoperability of c3 gates with qiskit
"""
from typing import Iterable, List, Optional
from qiskit.extensions import UnitaryGate
from qiskit.circuit.library import UnitaryGate
from qiskit.circuit import Gate
from qiskit.circuit.library import RXGate, RYGate, RZGate, CRXGate
from c3.libraries.constants import GATES
Expand Down
2 changes: 1 addition & 1 deletion examples/Full_loop_single_qubit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@
"from c3.qiskit import C3Provider\n",
"from c3.qiskit.c3_gates import RX90pGate\n",
"from qiskit import QuantumCircuit\n",
"from qiskit.tools.visualization import plot_histogram"
"from qiskit.visualization import plot_histogram"
]
},
{
Expand Down
94 changes: 63 additions & 31 deletions examples/Piecewise_constant_controls.ipynb

Large diffs are not rendered by default.

79 changes: 47 additions & 32 deletions examples/c3_qiskit.ipynb

Large diffs are not rendered by default.

322 changes: 202 additions & 120 deletions examples/two_qubit_entangling_gate.ipynb

Large diffs are not rendered by default.

279 changes: 157 additions & 122 deletions examples/two_qubits.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pre-commit>=2.7.1
pytest-cov>=2.11.1
pytest-xdist>=2.2.1
python-dateutil>=2.8.1
qiskit>=0.25.0
qiskit>=1.0
qiskit-aer>=0.13.2
rich>=9.2.0
scipy>=1.5.2
Expand Down
7 changes: 3 additions & 4 deletions test/test_qiskit.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@
CR90Gate,
SetParamsGate,
)
from qiskit.circuit.library import RXGate, RYGate, RZGate, CRXGate
from qiskit.extensions import UnitaryGate
from qiskit.circuit.library import RXGate, RYGate, RZGate, CRXGate, UnitaryGate
from qiskit.quantum_info import Statevector, Operator
from qiskit import transpile
from qiskit.providers import BackendV1 as Backend
from qiskit import execute, QuantumCircuit
from qiskit import QuantumCircuit
import pytest
import numpy as np

Expand Down Expand Up @@ -163,7 +162,7 @@ def test_too_many_qubits(backend, config_file):
received_backend.set_device_config(config_file)
qc = QuantumCircuit(4, 4)
with pytest.raises(C3QiskitError):
execute(qc, received_backend, shots=1000)
received_backend.run(qc, shots=1000)


@pytest.mark.parametrize(
Expand Down