Skip to content

Commit

Permalink
Merge 4b88585 into 4566775
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxiLi committed Aug 1, 2021
2 parents 4566775 + 4b88585 commit e70dffa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/qutip_qip/noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def process_noise(pulses, noise_list, dims, t1=None, t2=None,
noisy_pulses: list of :class:`.Pulse`
The noisy pulses, including the system noise.
"""
noise_list = noise_list.copy()
noisy_pulses = deepcopy(pulses)
systematic_noise = Pulse(None, None, label="systematic_noise")

Expand Down
8 changes: 8 additions & 0 deletions tests/test_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,11 @@ def test_pulse_dict(self):
processor = Processor(1)
processor.add_control(sigmax(), 0, label="test")
assert("test" in processor.get_pulse_dict())

def test_repeated_use_of_processor(self):
processor = Processor(1, t1=1.)
processor.add_pulse(
Pulse(sigmax(), targets=0, coeff=True))
result1 = processor.run_state(basis(2, 0), tlist=np.linspace(0, 1, 10))
result2 = processor.run_state(basis(2, 0), tlist=np.linspace(0, 1, 10))
assert_allclose(result1.states[-1].full(), result2.states[-1].full())

0 comments on commit e70dffa

Please sign in to comment.