Skip to content

Commit 840bb2b

Browse files
authored
Avoid Moment typechecks when (un)freezing circuits (#7150)
1 parent ce31720 commit 840bb2b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cirq-core/cirq/circuits/circuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ def freeze(self) -> 'cirq.FrozenCircuit':
18671867
from cirq.circuits.frozen_circuit import FrozenCircuit
18681868

18691869
if self._frozen is None:
1870-
self._frozen = FrozenCircuit.from_moments(*self._moments)
1870+
self._frozen = FrozenCircuit._from_moments(self._moments)
18711871
return self._frozen
18721872

18731873
def unfreeze(self, copy: bool = True) -> 'cirq.Circuit':

cirq-core/cirq/circuits/frozen_circuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def freeze(self) -> 'cirq.FrozenCircuit':
8484
return self
8585

8686
def unfreeze(self, copy: bool = True) -> 'cirq.Circuit':
87-
return Circuit.from_moments(*self)
87+
return Circuit._from_moments(self._moments)
8888

8989
@property
9090
def tags(self) -> Tuple[Hashable, ...]:

0 commit comments

Comments
 (0)