Skip to content

Commit 7cc2d3a

Browse files
authored
Merge pull request #238 from BoxiLi/remove-qir
Remove the QIR module
2 parents c600c8c + 9e55e52 commit 7cc2d3a

File tree

7 files changed

+5
-536
lines changed

7 files changed

+5
-536
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,40 @@ jobs:
1010
name: ${{ matrix.os }}, python${{ matrix.python-version }}, ${{ matrix.case-name }}
1111
runs-on: ${{ matrix.os }}
1212
strategy:
13+
fail-fast: false # Continue running jobs even if a previous job fails
1314
matrix:
1415
include:
1516
- case-name: [email protected]
1617
os: ubuntu-latest
1718
qutip-version: '==5.0.0'
18-
pyqir-version: ''
1919
python-version: '3.11'
2020
- case-name: [email protected]
2121
os: ubuntu-latest
2222
qutip-version: '@qutip-4.7.X'
23-
pyqir-version: ''
2423
python-version: '3.10'
2524
- case-name: qutip@master
2625
os: ubuntu-latest
2726
qutip-version: '@master'
28-
pyqir-version: ''
2927
python-version: '3.12'
3028
- case-name: [email protected]
3129
os: macOS-latest
3230
qutip-version: '==4.7.*'
3331
qiskit-version: ''
34-
pyqir-version: ''
3532
python-version: '3.11'
36-
- case-name: qiskit+qir
33+
- case-name: qiskit
3734
os: windows-latest
3835
qutip-version: ''
3936
qiskit-version: '==0.46.*'
40-
pyqir-version: '==0.6.2'
4137
python-version: '3.9'
42-
- case-name: qiskit+qir
38+
- case-name: qiskit
4339
os: macOS-latest
4440
qutip-version: ''
4541
qiskit-version: '==0.46.*'
46-
pyqir-version: '==0.6.2'
4742
python-version: '3.9'
48-
- case-name: qiskit+qir
43+
- case-name: qiskit
4944
os: ubuntu-latest
5045
qutip-version: ''
5146
qiskit-version: '==0.46.*'
52-
pyqir-version: '==0.6.2'
5347
python-version: '3.9'
5448

5549
steps:
@@ -72,11 +66,6 @@ jobs:
7266
if: ${{ matrix.qiskit-version != '' }}
7367
run: python -m pip install 'qiskit${{ matrix.qiskit-version }}' 'qiskit-aer==0.14.0.1'
7468

75-
- name: Install PyQIR from PyPI
76-
if: ${{ matrix.pyqir-version != '' }}
77-
# We use each subpackage explicitly here; see https://github.com/qir-alliance/pyqir/issues/167.
78-
run: python -m pip install 'pyqir-generator${{ matrix.pyqir-version }}' 'pyqir-parser${{ matrix.pyqir-version }}'
79-
8069
- name: Install qutip-qip
8170
# Installing in-place so that coveralls can locate the source code.
8271
run: |

doc/requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ numpydoc==1.4.0
99
matplotlib==3.5.2
1010
docutils==0.17.1
1111
sphinxcontrib-bibtex==2.4.2
12-
pyqir-generator==0.6.2
13-
pyqir-parser==0.6.2
1412
qiskit==0.46.1
1513
qiskit-aer==0.14.0.1

doc/source/apidoc.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Simulation based on operator-state multiplication.
1919
qutip_qip.qubits
2020
qutip_qip.decompose
2121
qutip_qip.qasm
22-
qutip_qip.qir
2322
qutip_qip.vqa
2423

2524
Pulse-level simulation

doc/source/apidoc/qutip_qip.qir.rst

Lines changed: 0 additions & 16 deletions
This file was deleted.

doc/source/qip-simulator.rst

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ We are left with a mixed state.
243243
Import and export quantum circuits
244244
==================================
245245

246-
QuTiP supports importing and exporting quantum circuits in the `OpenQASM 2.0 <https://github.com/Qiskit/openqasm/tree/OpenQASM2.x>`_ format, as well as exporting circuits to `Quantum Intermediate Representation <https://www.qir-alliance.org/>`_.
246+
QuTiP supports importing and exporting quantum circuits in the `OpenQASM 2.0 <https://github.com/Qiskit/openqasm/tree/OpenQASM2.x>`_ format.
247247
To import from and export to OpenQASM 2.0, you can use the :func:`.read_qasm` and :func:`.save_qasm` functions, respectively.
248248
We demonstrate this functionality by loading a circuit for preparing the :math:`\left|W\right\rangle`-state from an OpenQASM 2.0 file.
249249
The following code is in OpenQASM format:
@@ -289,24 +289,3 @@ One can save it in a ``.qasm`` file and import it using the following code:
289289

290290
from qutip_qip.qasm import read_qasm
291291
qc = read_qasm("source/w-state.qasm")
292-
293-
QuTiP circuits can also be exported to QIR:
294-
295-
.. doctest::
296-
297-
>>> from qutip_qip.circuit import QubitCircuit
298-
>>> from qutip_qip.qir import circuit_to_qir
299-
300-
>>> circuit = QubitCircuit(3, num_cbits=2)
301-
>>> msg, here, there = range(3)
302-
>>> circuit.add_gate("RZ", targets=[msg], arg_value=0.123)
303-
>>> circuit.add_gate("SNOT", targets=[here])
304-
>>> circuit.add_gate("CNOT", targets=[there], controls=[here])
305-
>>> circuit.add_gate("CNOT", targets=[here], controls=[msg])
306-
>>> circuit.add_gate("SNOT", targets=[msg])
307-
>>> circuit.add_measurement("Z", targets=[msg], classical_store=0)
308-
>>> circuit.add_measurement("Z", targets=[here], classical_store=1)
309-
>>> circuit.add_gate("X", targets=[there], classical_controls=[0])
310-
>>> circuit.add_gate("Z", targets=[there], classical_controls=[1])
311-
312-
>>> print(circuit_to_qir(circuit, "text")) # doctest: +SKIP

src/qutip_qip/qir.py

Lines changed: 0 additions & 236 deletions
This file was deleted.

0 commit comments

Comments
 (0)