Skip to content

Commit

Permalink
Merge pull request #92 from BoxiLi/update_from_qutip
Browse files Browse the repository at this point in the history
Minor bug fix and docstring improvement from qutip.qip
  • Loading branch information
BoxiLi committed Sep 8, 2021
2 parents cc85a48 + 0d720c0 commit 63a99c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/qutip_qip/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ class QubitCircuit:
A list of integer for the dimension of each composite system.
e.g [2,2,2,2,2] for 5 qubits system. If None, qubits system
will be the default option.
num_cbits : int
Number of classical bits in the system.
Examples
--------
Expand Down
11 changes: 8 additions & 3 deletions tests/test_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ def testPlot(self):
processor.add_control(sigmaz())
processor.pulses[0].tlist = tlist
processor.pulses[0].coeff = np.array([np.sin(t) for t in tlist])
processor.plot_pulses()
plt.clf()
fig, _ = processor.plot_pulses()
# testing under Xvfb with pytest-xvfb complains if figure windows are
# left open, so we politely close it:
plt.close(fig)

# cubic spline
tlist = np.linspace(0., 2*np.pi, 20)
Expand All @@ -180,7 +182,10 @@ def testPlot(self):
processor.pulses[0].tlist = tlist
processor.pulses[0].coeff = np.array([np.sin(t) for t in tlist])
processor.plot_pulses()
plt.clf()
fig, _ = processor.plot_pulses()
# testing under Xvfb with pytest-xvfb complains if figure windows are
# left open, so we politely close it:
plt.close(fig)

def testSpline(self):
"""
Expand Down

0 comments on commit 63a99c5

Please sign in to comment.