internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: quantumlib/Cirq

Issue:
CircuitOperation.qubit_map allows mapping qubits of different dimension
**Description of the issue**

If you do `CircuitOperation(..., qubit_map={LineQubit(0), LineQid(1, dimension=3)})`, it is happy but then fails during simulation with obscure message.

**How to reproduce the issue**

See above

**Expected behavior**

It should fail at circuit construction time with a friendly error message.

**Notes**

The check needs to happen in `with_qubit_mapping` as well.


Discussion:

Resolving patch:
diff --git a/cirq/circuits/circuit_operation.py b/cirq/circuits/circuit_operation.py
--- a/cirq/circuits/circuit_operation.py
+++ b/cirq/circuits/circuit_operation.py
@@ -148,6 +148,12 @@ def __post_init__(self):
                         'in a CircuitOperation. Consider remapping the key using '
                         '`measurement_key_map` in the CircuitOperation constructor.'
                     )
+
+        # Disallow qid mapping dimension conflicts.
+        for q, q_new in self.qubit_map.items():
+            if q_new.dimension != q.dimension:
+                raise ValueError(f'Qid dimension conflict.\nFrom qid: {q}\nTo qid: {q_new}')
+
         # Ensure that param_resolver is converted to an actual ParamResolver.
         object.__setattr__(self, 'param_resolver', study.ParamResolver(self.param_resolver))
 
@@ -445,6 +451,8 @@ def with_qubit_mapping(
         for q in self.circuit.all_qubits():
             q_new = transform(self.qubit_map.get(q, q))
             if q_new != q:
+                if q_new.dimension != q.dimension:
+                    raise ValueError(f'Qid dimension conflict.\nFrom qid: {q}\nTo qid: {q_new}')
                 new_map[q] = q_new
         new_op = self.replace(qubit_map=new_map)
         if len(set(new_op.qubits)) != len(set(self.qubits)):


Test patch:
diff --git a/cirq/circuits/circuit_operation_test.py b/cirq/circuits/circuit_operation_test.py
--- a/cirq/circuits/circuit_operation_test.py
+++ b/cirq/circuits/circuit_operation_test.py
@@ -102,6 +102,24 @@ def test_invalid_measurement_keys():
     _ = cirq.CircuitOperation(circuit, measurement_key_map={'m:a': 'ma'})
 
 
+def test_invalid_qubit_mapping():
+    q = cirq.LineQubit(0)
+    q3 = cirq.LineQid(1, dimension=3)
+
+    # Invalid qid remapping dict in constructor
+    with pytest.raises(ValueError, match='Qid dimension conflict'):
+        _ = cirq.CircuitOperation(cirq.FrozenCircuit(), qubit_map={q: q3})
+
+    # Invalid qid remapping dict in with_qubit_mapping call
+    c_op = cirq.CircuitOperation(cirq.FrozenCircuit(cirq.X(q)))
+    with pytest.raises(ValueError, match='Qid dimension conflict'):
+        _ = c_op.with_qubit_mapping({q: q3})
+
+    # Invalid qid remapping function in with_qubit_mapping call
+    with pytest.raises(ValueError, match='Qid dimension conflict'):
+        _ = c_op.with_qubit_mapping(lambda q: q3)
+
+
 def test_circuit_sharing():
     a, b, c = cirq.LineQubit.range(3)
     circuit = cirq.FrozenCircuit(
Repository: quantumlib/Cirq

Issue:
Documentation reference to MSGate is out of date
**Description of the issue**
The doc string [here](https://github.com/quantumlib/Cirq/blob/985b411c42cbd2cd97d21e766d28f1f332cfee8b/cirq/ops/parity_gates.py#L60) refers to `cirq.MSGate` which appears to have moved to `cirq.ion.ion_gates.MSGate`.

**How to reproduce the issue**
Look at https://quantumai.google/reference/python/cirq/ops/XXPowGate: "See also: `cirq.MSGate`".

**Cirq version**
0.10.0 and 0.11.0.dev


Discussion:

Resolving patch:
diff --git a/cirq/ops/parity_gates.py b/cirq/ops/parity_gates.py
--- a/cirq/ops/parity_gates.py
+++ b/cirq/ops/parity_gates.py
@@ -57,8 +57,8 @@ class XXPowGate(
         f = e^{\frac{i \pi t}{2}}.
         $$
 
-    See also: `cirq.MSGate` (the Mølmer–Sørensen gate), which is implemented via
-    this class.
+    See also: `cirq.ion.ion_gates.MSGate` (the Mølmer–Sørensen gate), which is
+    implemented via this class.
     """
 
     def _eigen_components(self) -> List[Tuple[float, np.ndarray]]:


Test patch:
Repository: quantumlib/Cirq

Issue:
Cannot add identity to PauliSum
**Description of the issue**

Identities cannot be added to PauliSums. This might be related to `cirq.IdentityGate` not being a `cirq.Pauli`.

**How to reproduce the issue**

```
ps = cirq.PauliSum()
ps += cirq.I(cirq.LineQubit(0))

# Generates the error:
# TypeError: unsupported operand type(s) for +=: 'PauliSum' and 'GateOperation'
```

**Cirq version**
0.11.0.dev




Discussion:
In lieu of a fix, users can wrap identity gates in `cirq.PauliString`s before mixing them into `PauliSum`s to avoid this issue.
```
psum = cirq.PauliSum()
pstr = cirq.PauliString(cirq.I(cirq.LineQubit(0)))
# does not fail
psum += pstr
```
Another shorter workaround is 
```
ps = cirq.PauliSum()
ps += 1*cirq.I(cirq.LineQubit(0))
```

but I was also wondering if `cirq.XPowerGate(exponent=0)` acts same as `IdentifyGate` or not. (Seems no except global phase difference).

Resolving patch:
diff --git a/cirq-core/cirq/ops/linear_combinations.py b/cirq-core/cirq/ops/linear_combinations.py
--- a/cirq-core/cirq/ops/linear_combinations.py
+++ b/cirq-core/cirq/ops/linear_combinations.py
@@ -575,7 +575,10 @@ def __iadd__(self, other):
 
     def __add__(self, other):
         if not isinstance(other, (numbers.Complex, PauliString, PauliSum)):
-            return NotImplemented
+            if hasattr(other, 'gate') and isinstance(other.gate, identity.IdentityGate):
+                other = PauliString(other)
+            else:
+                return NotImplemented
         result = self.copy()
         result += other
         return result


Test patch:
diff --git a/cirq-core/cirq/ops/linear_combinations_test.py b/cirq-core/cirq/ops/linear_combinations_test.py
--- a/cirq-core/cirq/ops/linear_combinations_test.py
+++ b/cirq-core/cirq/ops/linear_combinations_test.py
@@ -1137,6 +1137,10 @@ def test_paulisum_validation():
     ld = cirq.LinearDict({key: 2.0})
     assert cirq.PauliSum(ld) == cirq.PauliSum.from_pauli_strings([2 * cirq.X(q[0])])
 
+    ps = cirq.PauliSum()
+    ps += cirq.I(cirq.LineQubit(0))
+    assert ps == cirq.PauliSum(cirq.LinearDict({frozenset(): complex(1)}))
+
 
 def test_add_number_paulisum():
     q = cirq.LineQubit.range(2)
Repository: quantumlib/Cirq

Issue:
EjectPhasedPaulis incorrect transformation of rx(0) gate
**Description of the issue**
Sometimes you optimize a circuit containing an X, Y, or PhasedX rotation gate with zero angle.  Rotations with zero angle are equivalent to identity but come up in generated circuits.  `cirq.EjectPhasedPoaulis().optimize_circuit(circuit)` incorrectly resets the angle to π (or 1 half-turn) resulting in an circuit not equivalent to the input.

**How to reproduce the issue**

```python
import cirq

circuit = cirq.Circuit(
    cirq.rx(0)(cirq.LineQubit(0)),  # Any X or Y rotation with zero angle
)
print(circuit)  # 0: ───Rx(0)───
# A zero radian X rotation ^

c_opt = circuit.copy()
cirq.EjectPhasedPaulis().optimize_circuit(c_opt)
print(c_opt)  # 0: ───PhX(0)───
# A pi radian X rotation ^

# Fails
cirq.testing.assert_allclose_up_to_global_phase(
    cirq.unitary(circuit),
    cirq.unitary(c_opt),
    atol=1e-1
)
```

**Cirq version**
0.12.0.dev



Discussion:

Resolving patch:
diff --git a/cirq-core/cirq/optimizers/eject_phased_paulis.py b/cirq-core/cirq/optimizers/eject_phased_paulis.py
--- a/cirq-core/cirq/optimizers/eject_phased_paulis.py
+++ b/cirq-core/cirq/optimizers/eject_phased_paulis.py
@@ -68,7 +68,7 @@ def optimize_circuit(self, circuit: circuits.Circuit):
                 # Collect, phase, and merge Ws.
                 w = _try_get_known_phased_pauli(op, no_symbolic=not self.eject_parameterized)
                 if w is not None:
-                    if decompositions.is_negligible_turn(w[0] - 1, self.tolerance):
+                    if decompositions.is_negligible_turn((w[0] - 1) / 2, self.tolerance):
                         _potential_cross_whole_w(moment_index, op, self.tolerance, state)
                     else:
                         _potential_cross_partial_w(moment_index, op, state)


Test patch:
diff --git a/cirq-core/cirq/optimizers/eject_phased_paulis_test.py b/cirq-core/cirq/optimizers/eject_phased_paulis_test.py
--- a/cirq-core/cirq/optimizers/eject_phased_paulis_test.py
+++ b/cirq-core/cirq/optimizers/eject_phased_paulis_test.py
@@ -536,3 +536,16 @@ def test_blocked_by_unknown_and_symbols(sym):
         ),
         compare_unitaries=False,
     )
+
+
+def test_zero_x_rotation():
+    a = cirq.NamedQubit('a')
+
+    assert_optimizes(
+        before=quick_circuit(
+            [cirq.rx(0)(a)],
+        ),
+        expected=quick_circuit(
+            [cirq.rx(0)(a)],
+        ),
+    )
Repository: quantumlib/Cirq

Issue:
Push to PyPi failing
```
error in cirq setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
```

See https://github.com/quantumlib/Cirq/runs/2851981344



Discussion:
Still broken - pypi push fails with the tensorflow-docs dependency, we have to skip it.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,9 @@
 requirements = [f'{p.name}=={p.version}' for p in modules.list_modules()]
 
 dev_requirements = explode('dev_tools/requirements/deps/dev-tools.txt')
-dev_requirements = [r.strip() for r in dev_requirements]
+
+# filter out direct urls (https://github.com/pypa/pip/issues/6301)
+dev_requirements = [r.strip() for r in dev_requirements if "git+http" not in r]
 
 setup(
     name=name,


Test patch:
Repository: quantumlib/Cirq

Issue:
Density matrix factoring incorrect 
**Description of the issue**
Ref conversation at https://github.com/quantumlib/Cirq/pull/4100#issuecomment-875169467

Density matrix factorization was relying on state vector factorization, which attempted to normalize the factored state. This produced density matrices with trace != 1 when split-state simulation was enabled.


Discussion:

Resolving patch:
diff --git a/cirq-core/cirq/linalg/transformations.py b/cirq-core/cirq/linalg/transformations.py
--- a/cirq-core/cirq/linalg/transformations.py
+++ b/cirq-core/cirq/linalg/transformations.py
@@ -287,7 +287,7 @@ def fractional_swap(target):
     return out
 
 
-def partial_trace(tensor: np.ndarray, keep_indices: List[int]) -> np.ndarray:
+def partial_trace(tensor: np.ndarray, keep_indices: Sequence[int]) -> np.ndarray:
     """Takes the partial trace of a given tensor.
 
     The input tensor must have shape `(d_0, ..., d_{k-1}, d_0, ..., d_{k-1})`.
@@ -620,12 +620,13 @@ def factor_density_matrix(
         `remainder` means the sub-matrix on the remaining axes, in the same
         order as the original density matrix.
     """
-    axes1 = list(axes) + [i + int(t.ndim / 2) for i in axes]
-    extracted, remainder = factor_state_vector(t, axes1, validate=False)
+    extracted = partial_trace(t, axes)
+    remaining_axes = [i for i in range(t.ndim // 2) if i not in axes]
+    remainder = partial_trace(t, remaining_axes)
     if validate:
         t1 = density_matrix_kronecker_product(extracted, remainder)
-        axes2 = list(axes) + [i for i in range(int(t.ndim / 2)) if i not in axes]
-        t2 = transpose_density_matrix_to_axis_order(t1, axes2)
+        product_axes = list(axes) + remaining_axes
+        t2 = transpose_density_matrix_to_axis_order(t1, product_axes)
         if not np.allclose(t2, t, atol=atol):
             raise ValueError('The tensor cannot be factored by the requested axes')
     return extracted, remainder


Test patch:
diff --git a/cirq-core/cirq/sim/density_matrix_simulator_test.py b/cirq-core/cirq/sim/density_matrix_simulator_test.py
--- a/cirq-core/cirq/sim/density_matrix_simulator_test.py
+++ b/cirq-core/cirq/sim/density_matrix_simulator_test.py
@@ -1520,3 +1520,13 @@ def test_final_density_matrix_is_not_last_object():
     assert result.final_density_matrix is not initial_state
     assert not np.shares_memory(result.final_density_matrix, initial_state)
     np.testing.assert_equal(result.final_density_matrix, initial_state)
+
+
+def test_density_matrices_same_with_or_without_split_untangled_states():
+    sim = cirq.DensityMatrixSimulator(split_untangled_states=False)
+    q0, q1 = cirq.LineQubit.range(2)
+    circuit = cirq.Circuit(cirq.H(q0), cirq.CX.on(q0, q1), cirq.reset(q1))
+    result1 = sim.simulate(circuit).final_density_matrix
+    sim = cirq.DensityMatrixSimulator(split_untangled_states=True)
+    result2 = sim.simulate(circuit).final_density_matrix
+    assert np.allclose(result1, result2)
Repository: quantumlib/Cirq

Issue:
Automerge failing on bogus missing checks
**Description of the issue**

For example: https://github.com/quantumlib/Cirq/pull/4267#issuecomment-877402508



Discussion:

Resolving patch:
diff --git a/dev_tools/auto_merge.py b/dev_tools/auto_merge.py
--- a/dev_tools/auto_merge.py
+++ b/dev_tools/auto_merge.py
@@ -358,8 +358,9 @@ def get_pr_checks(pr: PullRequestDetails) -> Dict[str, Any]:
     References:
         https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref
     """
-    url = "https://api.github.com/repos/{}/{}/commits/{}/check-runs?access_token={}".format(
-        pr.repo.organization, pr.repo.name, pr.branch_sha, pr.repo.access_token
+    url = (
+        f"https://api.github.com/repos/{pr.repo.organization}/{pr.repo.name}"
+        f"/commits/{pr.branch_sha}/check-runs?per_page=100&access_token={pr.repo.access_token}"
     )
     response = requests.get(url, headers={'Accept': 'application/vnd.github.antiope-preview+json'})
 


Test patch:
Repository: quantumlib/Cirq

Issue:
`cirq.X**1` should be `_PauliX` instead of `XPowGate`
**Description of the issue**

As @ybc1991 pointed out - the type of `cirq.X**1` should be `_PauliX` instead of `XPowGate`. Context: https://github.com/quantumlib/Cirq/pull/4165/files#r646844399. 

Discussed on Cirq Cynque on June 9th 2021:
- We should just fix this 
- That would make the output type value-dependent. -- that is true, but it should be fine this direction, because _PauliX is a subclass of the XPowGate


**How to reproduce the issue**

```
print(type(cirq.X), type(cirq.X**1))
# Prints:
# <class 'cirq.ops.pauli_gates._PauliX'> <class 'cirq.ops.common_gates.XPowGate'>
```



Discussion:

Resolving patch:
diff --git a/cirq-core/cirq/ops/pauli_gates.py b/cirq-core/cirq/ops/pauli_gates.py
--- a/cirq-core/cirq/ops/pauli_gates.py
+++ b/cirq-core/cirq/ops/pauli_gates.py
@@ -108,7 +108,7 @@ def __init__(self):
         common_gates.XPowGate.__init__(self, exponent=1.0)
 
     def __pow__(self: '_PauliX', exponent: 'cirq.TParamVal') -> common_gates.XPowGate:
-        return common_gates.XPowGate(exponent=exponent)
+        return common_gates.XPowGate(exponent=exponent) if exponent != 1 else _PauliX()
 
     def _with_exponent(self: '_PauliX', exponent: 'cirq.TParamVal') -> common_gates.XPowGate:
         return self.__pow__(exponent)
@@ -135,7 +135,7 @@ def __init__(self):
         common_gates.YPowGate.__init__(self, exponent=1.0)
 
     def __pow__(self: '_PauliY', exponent: 'cirq.TParamVal') -> common_gates.YPowGate:
-        return common_gates.YPowGate(exponent=exponent)
+        return common_gates.YPowGate(exponent=exponent) if exponent != 1 else _PauliY()
 
     def _with_exponent(self: '_PauliY', exponent: 'cirq.TParamVal') -> common_gates.YPowGate:
         return self.__pow__(exponent)
@@ -162,7 +162,7 @@ def __init__(self):
         common_gates.ZPowGate.__init__(self, exponent=1.0)
 
     def __pow__(self: '_PauliZ', exponent: 'cirq.TParamVal') -> common_gates.ZPowGate:
-        return common_gates.ZPowGate(exponent=exponent)
+        return common_gates.ZPowGate(exponent=exponent) if exponent != 1 else _PauliZ()
 
     def _with_exponent(self: '_PauliZ', exponent: 'cirq.TParamVal') -> common_gates.ZPowGate:
         return self.__pow__(exponent)


Test patch:
diff --git a/cirq-core/cirq/ops/pauli_gates_test.py b/cirq-core/cirq/ops/pauli_gates_test.py
--- a/cirq-core/cirq/ops/pauli_gates_test.py
+++ b/cirq-core/cirq/ops/pauli_gates_test.py
@@ -216,3 +216,7 @@ def test_powers():
     assert isinstance(cirq.X ** -0.5, cirq.XPowGate)
     assert isinstance(cirq.Y ** 0.2, cirq.YPowGate)
     assert isinstance(cirq.Z ** 0.5, cirq.ZPowGate)
+
+    assert isinstance(cirq.X ** 1, cirq.Pauli)
+    assert isinstance(cirq.Y ** 1, cirq.Pauli)
+    assert isinstance(cirq.Z ** 1, cirq.Pauli)
Repository: quantumlib/Cirq

Issue:
random_quantum_circuit_generation potential speed improvement
As someone who's in the habit of creating a bunch of random quantum circuits, I noticed that it's pretty slow. I ran `snakeviz` on the creation of a lot of random circuits. The total cumulative time is 7.9s and 3.28s was spent in line 658. With some digging: it looks like the while loop to exclude consecutive single-qubit gates is big slow. In particular, it spends a decent amount of time canonicalizing PhasedXZ gates to make sure the current gate isn't the same as the previous one. 

You can very easily imagine switching to sampling gates not by value equality, but by index into the set of possible single qubit gates. You could probably do a more sophisticated way of choosing "random number between 0 and n except for x" than repeatedly sampling and rejecting.


Discussion:
I don't think this is skill-level/advanced. only normal cs skills required
Line 658 of what?

Edit: oh didn't notice the filename was in the issue title. random_quantum_circuit_generation.py
Yeah sorry. The file/module name is in the issue title. I could have been much more clear!

Resolving patch:
diff --git a/cirq-core/cirq/experiments/random_quantum_circuit_generation.py b/cirq-core/cirq/experiments/random_quantum_circuit_generation.py
--- a/cirq-core/cirq/experiments/random_quantum_circuit_generation.py
+++ b/cirq-core/cirq/experiments/random_quantum_circuit_generation.py
@@ -651,7 +651,7 @@ def random_gate(qubit: 'cirq.Qid') -> 'cirq.Gate':
             excluded_op = previous_single_qubit_layer.operation_at(qubit)
             excluded_gate = excluded_op.gate if excluded_op is not None else None
             g = self.single_qubit_gates[self.prng.randint(0, len(self.single_qubit_gates))]
-            while g == excluded_gate:
+            while g is excluded_gate:
                 g = self.single_qubit_gates[self.prng.randint(0, len(self.single_qubit_gates))]
             return g
 
@@ -678,7 +678,7 @@ def _single_qubit_gates_arg_to_factory(
 
     If only one single qubit gate is provided, it will be used everywhere.
     Otherwise, we use the factory that excludes operations that were used
-    in the previous layer.
+    in the previous layer. This check is done by gate identity, not equality.
     """
     if len(set(single_qubit_gates)) == 1:
         return _FixedSingleQubitLayerFactory({q: single_qubit_gates[0] for q in qubits})


Test patch:
Repository: quantumlib/Cirq

Issue:
FSimGate docstring for phi is missing a factor of 2
https://github.com/quantumlib/Cirq/blob/7951f84a0110be719c8a9e07aa1ffec2b0a31990/cirq-core/cirq/ops/fsim_gate.py#L91

A full CZ is expected to occur at `phi` = pi, not pi/2.


Discussion:

Resolving patch:
diff --git a/cirq-core/cirq/ops/fsim_gate.py b/cirq-core/cirq/ops/fsim_gate.py
--- a/cirq-core/cirq/ops/fsim_gate.py
+++ b/cirq-core/cirq/ops/fsim_gate.py
@@ -88,7 +88,7 @@ def __init__(self, theta: float, phi: float) -> None:
                 iSWAP gate. Maximum strength (full iswap) is at pi/2.
             phi: Controlled phase angle, in radians. Determines how much the
                 ``|11⟩`` state is phased. Note: uses opposite sign convention to
-                the CZPowGate. Maximum strength (full cz) is at pi/2.
+                the CZPowGate. Maximum strength (full cz) is at pi.
         """
         self.theta = _canonicalize(theta)
         self.phi = _canonicalize(phi)


Test patch:
Repository: quantumlib/Cirq

Issue:
subciruit._measurement_keys_() does not include parent path
Retroactively creating bug fixed by #4616.

```python
def test_keys_under_parent_path():
    a = cirq.LineQubit(0)
    op1 = cirq.CircuitOperation(cirq.FrozenCircuit(cirq.measure(a, key='A')))
    op2 = op1.with_key_path(('B',))
    assert cirq.measurement_key_names(op2) == {'B:A'}
```

The above fails with `{'A'} != {'B:A'}`. The parent path gets dropped.

Note this is different from #4618 (the repro above does *not* do `mapped_circuit()`), and simpler to fix. `subcircuit._measurement_keys_()` just needs to prepend the parent path before returning.


Discussion:

Resolving patch:
diff --git a/cirq-core/cirq/circuits/circuit_operation.py b/cirq-core/cirq/circuits/circuit_operation.py
--- a/cirq-core/cirq/circuits/circuit_operation.py
+++ b/cirq-core/cirq/circuits/circuit_operation.py
@@ -184,6 +184,9 @@ def _measurement_key_objs_(self) -> AbstractSet[value.MeasurementKey]:
                     for repetition_id in self.repetition_ids
                     for key in circuit_keys
                 }
+            circuit_keys = {
+                protocols.with_key_path_prefix(key, self.parent_path) for key in circuit_keys
+            }
             object.__setattr__(
                 self,
                 '_cached_measurement_key_objs',


Test patch:
diff --git a/cirq-core/cirq/circuits/circuit_operation_test.py b/cirq-core/cirq/circuits/circuit_operation_test.py
--- a/cirq-core/cirq/circuits/circuit_operation_test.py
+++ b/cirq-core/cirq/circuits/circuit_operation_test.py
@@ -756,6 +756,16 @@ def test_decompose_repeated_nested_measurements():
     assert op3.mapped_circuit(deep=True) == expected_circuit
 
 
+def test_keys_under_parent_path():
+    a = cirq.LineQubit(0)
+    op1 = cirq.CircuitOperation(cirq.FrozenCircuit(cirq.measure(a, key='A')))
+    assert cirq.measurement_key_names(op1) == {'A'}
+    op2 = op1.with_key_path(('B',))
+    assert cirq.measurement_key_names(op2) == {'B:A'}
+    op3 = op2.repeat(2)
+    assert cirq.measurement_key_names(op3) == {'B:0:A', 'B:1:A'}
+
+
 def test_mapped_circuit_preserves_moments():
     q0, q1 = cirq.LineQubit.range(2)
     fc = cirq.FrozenCircuit(cirq.Moment(cirq.X(q0)), cirq.Moment(cirq.X(q1)))
@@ -802,7 +812,7 @@ def test_tag_propagation():
         assert test_tag not in op.tags
 
 
-def test_keys_under_parent_path():
+def test_mapped_circuit_keeps_keys_under_parent_path():
     q = cirq.LineQubit(0)
     op1 = cirq.CircuitOperation(
         cirq.FrozenCircuit(