Skip to content

Commit

Permalink
Add smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
garrison committed Oct 31, 2023
1 parent 580b9b9 commit a50ae65
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/cutting/qpd/instructions/test_qpd_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@

import unittest
import copy
import io

import pytest
from qiskit.circuit.library.standard_gates import XGate, YGate, ZGate
from qiskit import QuantumCircuit, qpy
from qiskit.circuit.library.standard_gates import CXGate, XGate, YGate, ZGate

from circuit_knitting.cutting.qpd import (
QPDBasis,
Expand Down Expand Up @@ -102,3 +104,10 @@ def test_compare_1q_and_2q(self):
# Call both eq methods, since single qubit implements a slightly different equivalence
self.assertFalse(inst_2q == inst_1q)
self.assertFalse(inst_1q == inst_2q)

def test_qpy_serialization(self):
qc = QuantumCircuit(2)
qc.append(TwoQubitQPDGate.from_instruction(CXGate()), [0, 1])

f = io.BytesIO()
qpy.dump(qc, f)

0 comments on commit a50ae65

Please sign in to comment.