diff --git a/cirq-google/cirq_google/json_test_data/InternalGate.json b/cirq-google/cirq_google/json_test_data/InternalGate.json index 71a84db810e..eff3cf810ce 100644 --- a/cirq-google/cirq_google/json_test_data/InternalGate.json +++ b/cirq-google/cirq_google/json_test_data/InternalGate.json @@ -1,7 +1,7 @@ { "cirq_type": "InternalGate", "gate_name": "CouplerDelayZ", - "gate_module": "pyle.cirqtools.pyle_gates", + "gate_module": "internal.module", "num_qubits": 2, "delay": 1, "zpa": 0.0, diff --git a/cirq-google/cirq_google/json_test_data/InternalGate.repr b/cirq-google/cirq_google/json_test_data/InternalGate.repr index 71e1e74ecd6..2cf9b7ff6c0 100644 --- a/cirq-google/cirq_google/json_test_data/InternalGate.repr +++ b/cirq-google/cirq_google/json_test_data/InternalGate.repr @@ -1 +1 @@ -cirq_google.InternalGate(gate_name="CouplerDelayZ", gate_module="pyle.cirqtools.pyle_gates", num_qubits=2, delay=1, zpa=0.0, zpl=None) \ No newline at end of file +cirq_google.InternalGate(gate_name="CouplerDelayZ", gate_module="internal.module", num_qubits=2, delay=1, zpa=0.0, zpl=None) \ No newline at end of file diff --git a/cirq-google/cirq_google/ops/internal_gate.py b/cirq-google/cirq_google/ops/internal_gate.py index f5e1f37d498..258ae2dda9d 100644 --- a/cirq-google/cirq_google/ops/internal_gate.py +++ b/cirq-google/cirq_google/ops/internal_gate.py @@ -25,18 +25,12 @@ class InternalGate(ops.Gate): constructor stored in `self.gate_args`. """ - def __init__( - self, - gate_name: str, - gate_module: str = 'pyle.cirqtools.pyle_gates', - num_qubits: int = 1, - **kwargs, - ): + def __init__(self, gate_name: str, gate_module: str, num_qubits: int = 1, **kwargs): """Instatiates an InternalGate. Arguments: gate_name: Gate class name. - gate_module: The module of the gate (defualt: pyle.cirqtools.pyle_gates). + gate_module: The module of the gate. num_qubits: Number of qubits that the gate acts on. **kwargs: The named arguments to be passed to the gate constructor. """ diff --git a/cirq-google/cirq_google/ops/internal_gate_test.py b/cirq-google/cirq_google/ops/internal_gate_test.py index b212d4f6151..ce14ae294a3 100644 --- a/cirq-google/cirq_google/ops/internal_gate_test.py +++ b/cirq-google/cirq_google/ops/internal_gate_test.py @@ -20,16 +20,16 @@ def test_internal_gate(): g = cirq_google.InternalGate( gate_name="CouplerDelayZ", - gate_module='pyle.cirqtools.pyle_gates', + gate_module='internal_module', num_qubits=2, delay=1, zpa=0.0, zpl=None, ) - assert str(g) == 'pyle.cirqtools.pyle_gates.CouplerDelayZ(delay=1, zpa=0.0, zpl=None)' + assert str(g) == 'internal_module.CouplerDelayZ(delay=1, zpa=0.0, zpl=None)' want_repr = ( "cirq_google.InternalGate(gate_name='CouplerDelayZ', " - "gate_module='pyle.cirqtools.pyle_gates', num_qubits=2, " + "gate_module='internal_module', num_qubits=2, " "delay=1, zpa=0.0, zpl=None)" ) assert repr(g) == want_repr