Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cirq-core/cirq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,13 @@
)

from cirq.sim import (
ActOnArgs,
ActOnArgsContainer,
ActOnCliffordTableauArgs,
ActOnDensityMatrixArgs,
ActOnStabilizerCHFormArgs,
ActOnStabilizerArgs,
ActOnStateVectorArgs,
CIRCUIT_LIKE,
CliffordSimulator,
CliffordState,
Expand All @@ -460,6 +467,7 @@
measure_state_vector,
final_density_matrix,
final_state_vector,
OperationTarget,
sample,
sample_density_matrix,
sample_state_vector,
Expand Down
8 changes: 8 additions & 0 deletions cirq-core/cirq/protocols/json_test_data/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,19 @@
'Heatmap',
'TwoQubitInteractionHeatmap',
# Intermediate states with work buffers and unknown external prng guts.
'ActOnArgs',
'ActOnArgsContainer',
'ActOnCliffordTableauArgs',
'ActOnDensityMatrixArgs',
'ActOnStabilizerArgs',
'ActOnStabilizerCHFormArgs',
'ActOnStateVectorArgs',
'ApplyChannelArgs',
'ApplyMixtureArgs',
'ApplyUnitaryArgs',
'CliffordTableauSimulationState',
'DensityMatrixSimulationState',
'OperationTarget',
'SimulationProductState',
'SimulationState',
'SimulationStateBase',
Expand Down
13 changes: 13 additions & 0 deletions cirq-core/cirq/sim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@

"""Classes for circuit simulators and base implementations of these classes."""

from cirq.sim.act_on_args import ActOnArgs

from cirq.sim.act_on_args_container import ActOnArgsContainer

from cirq.sim.act_on_density_matrix_args import ActOnDensityMatrixArgs

from cirq.sim.act_on_state_vector_args import ActOnStateVectorArgs

from cirq.sim.clifford import (
ActOnCliffordTableauArgs,
ActOnStabilizerArgs,
ActOnStabilizerCHFormArgs,
CliffordSimulator,
CliffordSimulatorStepResult,
CliffordState,
Expand Down Expand Up @@ -45,6 +56,8 @@
sample_sweep,
)

from cirq.sim.operation_target import OperationTarget

from cirq.sim.simulation_product_state import SimulationProductState

from cirq.sim.simulation_state import SimulationState
Expand Down
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/act_on_args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.simulation_state import SimulationState


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.SimulationState instead.')
class ActOnArgs(SimulationState):
pass
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/act_on_args_container.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.simulation_product_state import SimulationProductState


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.SimulationProductState instead.')
class ActOnArgsContainer(SimulationProductState):
pass
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/act_on_density_matrix_args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.density_matrix_simulation_state import DensityMatrixSimulationState


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.DensityMatrixSimulationState instead.')
class ActOnDensityMatrixArgs(DensityMatrixSimulationState):
pass
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/act_on_state_vector_args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.state_vector_simulation_state import StateVectorSimulationState


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.StateVectorSimulationState instead.')
class ActOnStateVectorArgs(StateVectorSimulationState):
pass
6 changes: 6 additions & 0 deletions cirq-core/cirq/sim/clifford/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# pylint: disable=wrong-or-nonexistent-copyright-notice

from cirq.sim.clifford.act_on_clifford_tableau_args import ActOnCliffordTableauArgs

from cirq.sim.clifford.act_on_stabilizer_args import ActOnStabilizerArgs

from cirq.sim.clifford.act_on_stabilizer_ch_form_args import ActOnStabilizerCHFormArgs

from cirq.sim.clifford.clifford_simulator import (
CliffordSimulator,
CliffordSimulatorStepResult,
Expand Down
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/clifford/act_on_clifford_tableau_args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.clifford.clifford_tableau_simulation_state import CliffordTableauSimulationState


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.CliffordTableauSimulationState instead.')
class ActOnCliffordTableauArgs(CliffordTableauSimulationState):
pass
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/clifford/act_on_stabilizer_args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.clifford.stabilizer_simulation_state import StabilizerSimulationState


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.StabilizerSimulationState instead.')
class ActOnStabilizerArgs(StabilizerSimulationState):
pass
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/clifford/act_on_stabilizer_ch_form_args.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.clifford.stabilizer_ch_form_simulation_state import StabilizerChFormSimulationState


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.StabilizerChFormSimulationState instead.')
class ActOnStabilizerCHFormArgs(StabilizerChFormSimulationState):
pass
21 changes: 21 additions & 0 deletions cirq-core/cirq/sim/operation_target.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from cirq import _compat
from cirq.sim.simulation_state_base import SimulationStateBase


@_compat.deprecated_class(deadline='v0.16', fix='Use cirq.SimulationStateBase instead.')
class OperationTarget(SimulationStateBase):
pass