Skip to content

Commit

Permalink
changed arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
naerabati committed Jun 21, 2023
1 parent 01aa246 commit 15924e7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cirq-core/cirq/sim/classical_simulator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestSimulator:
def test_x_gate():
def test_x_gate(self):
q0 = cirq.LineQubit.range(1)
circuit = cirq.Circuit()
circuit = cirq.Circuit(cirq.X(q0), cirq.measure(cirq.LineQubit(q0), key='key'))
Expand All @@ -14,7 +14,7 @@ def test_x_gate():
results = sim._run(circuit=circuit, param_resolver=None, repetitions=1)
assert results == expected_results

def test_CNOT():
def test_CNOT(self):
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit()
circuit.append(cirq.X(q0))
Expand Down Expand Up @@ -45,7 +45,7 @@ def test_qubit_order():
results = sim._run(circuit=circuit, param_resolver=None, repetitions=1)
np.testing.assert_equal(results, expected_results)

def test_same_key_instances():
def test_same_key_instances(self):
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit()
circuit.append(cirq.measure((q0, q1), key='key'))
Expand All @@ -56,7 +56,7 @@ def test_same_key_instances():
results = sim._run(circuit=circuit, param_resolver=None, repetitions=1)
np.testing.assert_equal(results, expected_results)

def test_same_key_instances_order():
def test_same_key_instances_order(self):
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit()
circuit.append(cirq.X(q0))
Expand All @@ -68,7 +68,7 @@ def test_same_key_instances_order():
results = sim._run(circuit=circuit, param_resolver=None, repetitions=1)
np.testing.assert_equal(results, expected_results)

def test_repetitions():
def test_repetitions(self):
q0 = cirq.LineQubit.range(0)
circuit = cirq.Circuit()
circuit.append(cirq.measure(q0, key='key'))
Expand All @@ -82,7 +82,7 @@ def test_repetitions():
results = sim._run(circuit=circuit, param_resolver=None, repetitions=10)
np.testing.assert_equal(results, expected_results)

def test_multiple_gates():
def test_multiple_gates(self):
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit()
circuit.append(cirq.X(q0))
Expand All @@ -96,7 +96,7 @@ def test_multiple_gates():
results = sim._run(circuit=circuit, param_resolver=None, repetitions=1)
np.testing.assert_equal(results, expected_results)

def test_multiple_gates_order():
def test_multiple_gates_order(self):
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit()
circuit.append(cirq.X(q0))
Expand All @@ -108,7 +108,7 @@ def test_multiple_gates_order():
results = sim._run(circuit=circuit, param_resolver=None, repetitions=1)
np.testing.assert_equal(results, expected_results)

def test_param_resolver():
def test_param_resolver(self):
gate = cirq.CNOT ** sympy.Symbol('t')
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit()
Expand All @@ -131,7 +131,7 @@ def test_param_resolver():
results_with_paramter_one, {'key': np.array([[[1]]], dtype=np.uint8)}
)

def test_unknown_gates():
def test_unknown_gates(self):
gate = cirq.CNOT ** sympy.Symbol('t')
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit()
Expand Down

0 comments on commit 15924e7

Please sign in to comment.