Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
eliottrosenberg committed Jul 11, 2024
1 parent bccffec commit 4078f86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cirq-core/cirq/transformers/noise_adding_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
def test_noise_adding():
qubits = devices.LineQubit.range(4)
circuit = circuits.Circuit(ops.CZ(*qubits[:2]), ops.CZ(*qubits[2:])) * 10
transformed_circuit_p0 = na.add_depolarizing_noise_to_two_qubit_gates(circuit, 0.0)
transformed_circuit_p0 = na.add_depolarizing_noise_to_two_qubit_gates(circuit, p=0.0)
assert transformed_circuit_p0 == circuit
transformed_circuit_p1 = na.add_depolarizing_noise_to_two_qubit_gates(circuit, 1.0)
transformed_circuit_p1 = na.add_depolarizing_noise_to_two_qubit_gates(circuit, p=1.0)
assert len(transformed_circuit_p1) == 20
transformed_circuit_p0_03 = na.add_depolarizing_noise_to_two_qubit_gates(circuit, 0.03)
transformed_circuit_p0_03 = na.add_depolarizing_noise_to_two_qubit_gates(circuit, p=0.03)
assert 10 <= len(transformed_circuit_p0_03) <= 20
transformed_circuit_p_dict = na.add_depolarizing_noise_to_two_qubit_gates(
circuit, {tuple(qubits[:2]): 1.0, tuple(qubits[2:]): 0.0}
circuit, p={tuple(qubits[:2]): 1.0, tuple(qubits[2:]): 0.0}
)
assert len(transformed_circuit_p_dict) == 20

0 comments on commit 4078f86

Please sign in to comment.