cirq-core 1.5.0.dev20250327175906__py3-none-any.whl → 1.5.0.dev20250327210023__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cirq-core might be problematic. Click here for more details.
- cirq/_compat_test.py +11 -9
- cirq/_import.py +6 -7
- cirq/_version.py +1 -1
- cirq/_version_test.py +1 -1
- cirq/circuits/_block_diagram_drawer.py +1 -2
- cirq/circuits/_block_diagram_drawer_test.py +3 -3
- cirq/circuits/_box_drawing_character_data.py +0 -1
- cirq/circuits/_box_drawing_character_data_test.py +2 -2
- cirq/circuits/_bucket_priority_queue.py +0 -1
- cirq/circuits/_bucket_priority_queue_test.py +1 -1
- cirq/circuits/circuit.py +1 -1
- cirq/circuits/circuit_operation.py +1 -1
- cirq/circuits/circuit_test.py +2 -3
- cirq/circuits/frozen_circuit.py +1 -1
- cirq/circuits/moment.py +4 -5
- cirq/circuits/optimization_pass.py +1 -1
- cirq/circuits/optimization_pass_test.py +3 -2
- cirq/circuits/qasm_output.py +3 -3
- cirq/circuits/qasm_output_test.py +2 -1
- cirq/circuits/text_diagram_drawer.py +3 -3
- cirq/circuits/text_diagram_drawer_test.py +5 -4
- cirq/contrib/acquaintance/bipartite.py +1 -2
- cirq/contrib/acquaintance/bipartite_test.py +0 -1
- cirq/contrib/acquaintance/devices.py +3 -4
- cirq/contrib/acquaintance/devices_test.py +0 -1
- cirq/contrib/acquaintance/executor.py +4 -6
- cirq/contrib/acquaintance/executor_test.py +2 -2
- cirq/contrib/acquaintance/gates.py +2 -3
- cirq/contrib/acquaintance/gates_test.py +1 -1
- cirq/contrib/acquaintance/inspection_utils.py +1 -2
- cirq/contrib/acquaintance/inspection_utils_test.py +1 -1
- cirq/contrib/acquaintance/mutation_utils.py +2 -4
- cirq/contrib/acquaintance/optimizers.py +2 -3
- cirq/contrib/acquaintance/optimizers_test.py +1 -1
- cirq/contrib/acquaintance/permutation.py +1 -1
- cirq/contrib/acquaintance/permutation_test.py +1 -1
- cirq/contrib/acquaintance/shift.py +1 -1
- cirq/contrib/acquaintance/strategies/complete.py +0 -1
- cirq/contrib/acquaintance/strategies/cubic.py +1 -1
- cirq/contrib/circuitdag/circuit_dag.py +2 -2
- cirq/contrib/circuitdag/circuit_dag_test.py +1 -1
- cirq/contrib/graph_device/graph_device.py +1 -3
- cirq/contrib/graph_device/graph_device_test.py +0 -1
- cirq/contrib/graph_device/hypergraph_test.py +1 -0
- cirq/contrib/json_test.py +2 -2
- cirq/contrib/noise_models/noise_models.py +1 -1
- cirq/contrib/paulistring/clifford_optimize.py +1 -1
- cirq/contrib/paulistring/clifford_optimize_test.py +0 -1
- cirq/contrib/paulistring/clifford_target_gateset.py +3 -3
- cirq/contrib/paulistring/optimize.py +2 -2
- cirq/contrib/paulistring/optimize_test.py +0 -1
- cirq/contrib/paulistring/pauli_string_dag_test.py +0 -1
- cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation.py +3 -3
- cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py +3 -4
- cirq/contrib/paulistring/pauli_string_optimize_test.py +1 -2
- cirq/contrib/paulistring/recombine.py +2 -2
- cirq/contrib/paulistring/recombine_test.py +1 -1
- cirq/contrib/paulistring/separate.py +1 -2
- cirq/contrib/qasm_import/_lexer.py +1 -0
- cirq/contrib/qasm_import/_lexer_test.py +1 -0
- cirq/contrib/qasm_import/_parser.py +2 -3
- cirq/contrib/qasm_import/_parser_test.py +1 -1
- cirq/contrib/qasm_import/qasm_test.py +1 -1
- cirq/contrib/quantum_volume/quantum_volume.py +1 -1
- cirq/contrib/quantum_volume/quantum_volume_test.py +3 -1
- cirq/contrib/quimb/density_matrix.py +1 -1
- cirq/contrib/quimb/state_vector.py +1 -1
- cirq/contrib/quirk/export_to_quirk.py +3 -3
- cirq/contrib/routing/device.py +1 -1
- cirq/contrib/routing/device_test.py +1 -2
- cirq/contrib/routing/greedy.py +2 -2
- cirq/contrib/routing/initialization_test.py +1 -1
- cirq/contrib/routing/swap_network.py +1 -1
- cirq/contrib/routing/utils.py +2 -2
- cirq/contrib/routing/utils_test.py +1 -2
- cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py +2 -2
- cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking_test.py +6 -4
- cirq/contrib/svg/svg.py +2 -3
- cirq/devices/device.py +3 -1
- cirq/devices/device_test.py +1 -0
- cirq/devices/grid_device_metadata.py +2 -1
- cirq/devices/grid_device_metadata_test.py +2 -1
- cirq/devices/grid_qubit.py +2 -2
- cirq/devices/insertion_noise_model.py +1 -1
- cirq/devices/insertion_noise_model_test.py +1 -1
- cirq/devices/line_qubit.py +1 -0
- cirq/devices/named_topologies.py +6 -6
- cirq/devices/named_topologies_test.py +5 -4
- cirq/devices/noise_model.py +2 -2
- cirq/devices/noise_properties.py +2 -2
- cirq/devices/noise_properties_test.py +2 -2
- cirq/devices/noise_utils.py +3 -3
- cirq/devices/superconducting_qubits_noise_properties.py +2 -2
- cirq/devices/superconducting_qubits_noise_properties_test.py +3 -3
- cirq/devices/thermal_noise_model.py +2 -1
- cirq/devices/unconstrained_device.py +1 -1
- cirq/experiments/qubit_characterizations.py +9 -10
- cirq/experiments/qubit_characterizations_test.py +4 -6
- cirq/experiments/random_quantum_circuit_generation.py +3 -4
- cirq/experiments/random_quantum_circuit_generation_test.py +4 -4
- cirq/experiments/readout_confusion_matrix.py +5 -3
- cirq/experiments/readout_confusion_matrix_test.py +2 -2
- cirq/experiments/single_qubit_readout_calibration.py +5 -4
- cirq/experiments/single_qubit_readout_calibration_test.py +1 -1
- cirq/experiments/t1_decay_experiment.py +4 -5
- cirq/experiments/t1_decay_experiment_test.py +1 -2
- cirq/experiments/t2_decay_experiment.py +0 -1
- cirq/experiments/t2_decay_experiment_test.py +1 -2
- cirq/experiments/two_qubit_xeb.py +13 -10
- cirq/experiments/two_qubit_xeb_test.py +3 -4
- cirq/experiments/xeb_fitting.py +6 -3
- cirq/experiments/xeb_fitting_test.py +5 -5
- cirq/experiments/xeb_sampling.py +5 -5
- cirq/experiments/xeb_simulation.py +3 -2
- cirq/experiments/z_phase_calibration.py +4 -3
- cirq/experiments/z_phase_calibration_test.py +4 -5
- cirq/interop/quirk/cells/arithmetic_cells.py +8 -8
- cirq/interop/quirk/cells/arithmetic_cells_test.py +1 -1
- cirq/interop/quirk/cells/cell.py +6 -6
- cirq/interop/quirk/cells/composite_cell.py +5 -5
- cirq/interop/quirk/cells/composite_cell_test.py +1 -1
- cirq/interop/quirk/cells/frequency_space_cells.py +2 -2
- cirq/interop/quirk/cells/ignored_cells.py +1 -1
- cirq/interop/quirk/cells/input_cells.py +1 -1
- cirq/interop/quirk/cells/input_cells_test.py +1 -1
- cirq/interop/quirk/cells/input_rotation_cells.py +1 -1
- cirq/interop/quirk/cells/input_rotation_cells_test.py +1 -1
- cirq/interop/quirk/cells/measurement_cells.py +1 -1
- cirq/interop/quirk/cells/parse.py +3 -4
- cirq/interop/quirk/cells/parse_test.py +1 -1
- cirq/interop/quirk/cells/single_qubit_rotation_cells.py +1 -1
- cirq/interop/quirk/cells/swap_cell_test.py +1 -1
- cirq/interop/quirk/cells/unsupported_cells.py +1 -1
- cirq/interop/quirk/url_to_circuit.py +7 -7
- cirq/interop/quirk/url_to_circuit_test.py +1 -1
- cirq/json_resolver_cache.py +6 -5
- cirq/linalg/combinators.py +2 -2
- cirq/linalg/combinators_test.py +1 -1
- cirq/linalg/decompositions.py +2 -2
- cirq/linalg/decompositions_test.py +1 -2
- cirq/linalg/diagonalize.py +1 -1
- cirq/linalg/diagonalize_test.py +1 -1
- cirq/linalg/predicates.py +2 -2
- cirq/linalg/predicates_test.py +1 -0
- cirq/linalg/tolerance.py +1 -1
- cirq/neutral_atoms/convert_to_neutral_atom_gates_test.py +0 -1
- cirq/ops/arithmetic_operation.py +2 -2
- cirq/ops/arithmetic_operation_test.py +2 -2
- cirq/ops/classically_controlled_operation.py +2 -2
- cirq/ops/clifford_gate.py +3 -3
- cirq/ops/clifford_gate_test.py +1 -1
- cirq/ops/common_channels.py +2 -2
- cirq/ops/common_gate_families.py +1 -1
- cirq/ops/common_gate_families_test.py +1 -0
- cirq/ops/common_gates.py +3 -3
- cirq/ops/control_values.py +2 -2
- cirq/ops/control_values_test.py +2 -1
- cirq/ops/controlled_gate.py +2 -2
- cirq/ops/controlled_operation.py +3 -3
- cirq/ops/dense_pauli_string.py +3 -3
- cirq/ops/diagonal_gate.py +1 -1
- cirq/ops/diagonal_gate_test.py +1 -0
- cirq/ops/eigen_gate.py +1 -1
- cirq/ops/eigen_gate_test.py +1 -1
- cirq/ops/fourier_transform.py +1 -1
- cirq/ops/fourier_transform_test.py +2 -1
- cirq/ops/gate_operation.py +5 -5
- cirq/ops/gateset_test.py +4 -2
- cirq/ops/global_phase_op.py +3 -3
- cirq/ops/identity.py +1 -1
- cirq/ops/kraus_channel.py +1 -0
- cirq/ops/kraus_channel_test.py +2 -1
- cirq/ops/linear_combinations.py +9 -9
- cirq/ops/matrix_gates.py +2 -2
- cirq/ops/measure_util.py +2 -2
- cirq/ops/measurement_gate.py +1 -1
- cirq/ops/measurement_gate_test.py +1 -0
- cirq/ops/mixed_unitary_channel.py +1 -0
- cirq/ops/mixed_unitary_channel_test.py +2 -1
- cirq/ops/named_qubit.py +0 -1
- cirq/ops/op_tree.py +1 -1
- cirq/ops/parallel_gate.py +1 -1
- cirq/ops/parallel_gate_test.py +2 -1
- cirq/ops/parity_gates.py +5 -6
- cirq/ops/pauli_gates.py +4 -5
- cirq/ops/pauli_gates_test.py +1 -0
- cirq/ops/pauli_interaction_gate.py +3 -3
- cirq/ops/pauli_interaction_gate_test.py +2 -3
- cirq/ops/pauli_measurement_gate.py +4 -4
- cirq/ops/pauli_string.py +5 -5
- cirq/ops/pauli_string_phasor.py +6 -7
- cirq/ops/pauli_string_phasor_test.py +2 -1
- cirq/ops/pauli_string_raw_types.py +1 -0
- cirq/ops/pauli_sum_exponential.py +1 -1
- cirq/ops/pauli_sum_exponential_test.py +0 -1
- cirq/ops/permutation_gate_test.py +1 -1
- cirq/ops/phased_x_gate.py +3 -4
- cirq/ops/phased_x_z_gate.py +3 -3
- cirq/ops/qubit_manager.py +2 -1
- cirq/ops/qubit_manager_test.py +2 -1
- cirq/ops/qubit_order.py +1 -1
- cirq/ops/random_gate_channel.py +1 -1
- cirq/ops/raw_types.py +4 -4
- cirq/ops/raw_types_test.py +2 -2
- cirq/ops/state_preparation_channel.py +2 -2
- cirq/ops/state_preparation_channel_test.py +2 -1
- cirq/ops/swap_gates.py +2 -2
- cirq/ops/three_qubit_gates.py +2 -3
- cirq/ops/three_qubit_gates_test.py +1 -0
- cirq/ops/two_qubit_diagonal_gate.py +3 -2
- cirq/ops/uniform_superposition_gate.py +3 -3
- cirq/ops/uniform_superposition_gate_test.py +1 -0
- cirq/ops/wait_gate.py +1 -1
- cirq/protocols/act_on_protocol_test.py +1 -1
- cirq/protocols/apply_channel_protocol.py +2 -2
- cirq/protocols/apply_mixture_protocol.py +1 -1
- cirq/protocols/approximate_equality_protocol.py +3 -4
- cirq/protocols/approximate_equality_protocol_test.py +3 -1
- cirq/protocols/circuit_diagram_info_protocol.py +5 -5
- cirq/protocols/decompose_protocol.py +3 -4
- cirq/protocols/decompose_protocol_test.py +1 -0
- cirq/protocols/equal_up_to_global_phase_protocol_test.py +1 -0
- cirq/protocols/has_stabilizer_effect_protocol.py +5 -5
- cirq/protocols/has_unitary_protocol.py +1 -1
- cirq/protocols/inverse_protocol.py +1 -1
- cirq/protocols/json_serialization_test.py +1 -1
- cirq/protocols/kraus_protocol.py +1 -2
- cirq/protocols/kraus_protocol_test.py +0 -1
- cirq/protocols/mixture_protocol_test.py +1 -2
- cirq/protocols/pauli_expansion_protocol.py +1 -0
- cirq/protocols/pow_protocol.py +1 -1
- cirq/protocols/qasm.py +1 -1
- cirq/protocols/qid_shape_protocol.py +1 -1
- cirq/protocols/resolve_parameters.py +1 -2
- cirq/protocols/resolve_parameters_test.py +2 -1
- cirq/protocols/trace_distance_bound.py +1 -1
- cirq/protocols/trace_distance_bound_test.py +1 -0
- cirq/protocols/unitary_protocol.py +2 -2
- cirq/qis/clifford_tableau.py +2 -1
- cirq/qis/entropy.py +1 -1
- cirq/qis/entropy_test.py +2 -1
- cirq/qis/measures.py +3 -3
- cirq/qis/noise_utils_test.py +4 -4
- cirq/qis/quantum_state_representation.py +1 -1
- cirq/qis/states.py +3 -2
- cirq/sim/classical_simulator.py +7 -6
- cirq/sim/classical_simulator_test.py +3 -1
- cirq/sim/clifford/stabilizer_state_ch_form.py +1 -0
- cirq/sim/density_matrix_simulator.py +1 -1
- cirq/sim/density_matrix_utils.py +1 -1
- cirq/sim/mux.py +2 -2
- cirq/sim/simulation_state.py +3 -4
- cirq/sim/simulation_state_base.py +1 -1
- cirq/sim/simulation_utils_test.py +2 -3
- cirq/sim/simulator_base.py +5 -5
- cirq/sim/simulator_test.py +2 -2
- cirq/sim/sparse_simulator.py +2 -2
- cirq/sim/sparse_simulator_test.py +1 -1
- cirq/sim/state_vector.py +2 -2
- cirq/sim/state_vector_simulator.py +4 -4
- cirq/study/flatten_expressions.py +2 -2
- cirq/study/flatten_expressions_test.py +1 -1
- cirq/study/resolver.py +1 -0
- cirq/study/result.py +3 -3
- cirq/study/sweepable.py +3 -2
- cirq/study/sweeps.py +4 -4
- cirq/study/sweeps_test.py +1 -0
- cirq/testing/circuit_compare.py +3 -4
- cirq/testing/circuit_compare_test.py +1 -2
- cirq/testing/consistent_act_on.py +3 -3
- cirq/testing/consistent_channels_test.py +2 -1
- cirq/testing/consistent_controlled_gate_op.py +3 -2
- cirq/testing/consistent_controlled_gate_op_test.py +2 -3
- cirq/testing/consistent_decomposition.py +1 -1
- cirq/testing/consistent_decomposition_test.py +1 -2
- cirq/testing/consistent_phase_by.py +1 -1
- cirq/testing/consistent_phase_by_test.py +1 -2
- cirq/testing/consistent_protocols.py +9 -9
- cirq/testing/consistent_protocols_test.py +3 -4
- cirq/testing/consistent_qasm.py +1 -1
- cirq/testing/consistent_qasm_test.py +1 -1
- cirq/testing/consistent_resolve_parameters.py +2 -1
- cirq/testing/consistent_specified_has_unitary_test.py +1 -1
- cirq/testing/consistent_unitary.py +3 -1
- cirq/testing/consistent_unitary_test.py +3 -3
- cirq/testing/devices.py +1 -1
- cirq/testing/devices_test.py +1 -0
- cirq/testing/equals_tester.py +1 -3
- cirq/testing/equals_tester_test.py +1 -0
- cirq/testing/equivalent_basis_map.py +1 -0
- cirq/testing/equivalent_basis_map_test.py +0 -1
- cirq/testing/json.py +2 -3
- cirq/testing/lin_alg_utils_test.py +1 -1
- cirq/testing/order_tester.py +1 -1
- cirq/testing/order_tester_test.py +1 -1
- cirq/testing/random_circuit.py +2 -2
- cirq/testing/random_circuit_test.py +1 -1
- cirq/testing/routing_devices_test.py +2 -1
- cirq/testing/sample_circuits.py +1 -1
- cirq/testing/sample_gates.py +3 -2
- cirq/testing/sample_gates_test.py +2 -2
- cirq/transformers/align.py +1 -0
- cirq/transformers/analytical_decompositions/clifford_decomposition.py +2 -1
- cirq/transformers/analytical_decompositions/clifford_decomposition_test.py +1 -1
- cirq/transformers/analytical_decompositions/controlled_gate_decomposition.py +1 -1
- cirq/transformers/analytical_decompositions/cphase_to_fsim_test.py +1 -1
- cirq/transformers/analytical_decompositions/pauli_string_decomposition.py +2 -2
- cirq/transformers/analytical_decompositions/pauli_string_decomposition_test.py +4 -4
- cirq/transformers/analytical_decompositions/quantum_shannon_decomposition.py +6 -7
- cirq/transformers/analytical_decompositions/quantum_shannon_decomposition_test.py +5 -5
- cirq/transformers/analytical_decompositions/single_qubit_decompositions.py +1 -1
- cirq/transformers/analytical_decompositions/single_to_two_qubit_isometry.py +1 -1
- cirq/transformers/analytical_decompositions/single_to_two_qubit_isometry_test.py +1 -0
- cirq/transformers/analytical_decompositions/three_qubit_decomposition.py +2 -3
- cirq/transformers/analytical_decompositions/three_qubit_decomposition_test.py +1 -1
- cirq/transformers/analytical_decompositions/two_qubit_state_preparation.py +2 -1
- cirq/transformers/analytical_decompositions/two_qubit_state_preparation_test.py +2 -1
- cirq/transformers/analytical_decompositions/two_qubit_to_cz.py +5 -6
- cirq/transformers/analytical_decompositions/two_qubit_to_cz_test.py +2 -2
- cirq/transformers/analytical_decompositions/two_qubit_to_fsim.py +1 -1
- cirq/transformers/analytical_decompositions/two_qubit_to_fsim_test.py +1 -2
- cirq/transformers/analytical_decompositions/two_qubit_to_ms.py +2 -2
- cirq/transformers/analytical_decompositions/two_qubit_to_sqrt_iswap.py +1 -1
- cirq/transformers/analytical_decompositions/two_qubit_to_sqrt_iswap_test.py +2 -1
- cirq/transformers/drop_empty_moments.py +1 -0
- cirq/transformers/drop_negligible_operations.py +1 -0
- cirq/transformers/dynamical_decoupling.py +7 -7
- cirq/transformers/dynamical_decoupling_test.py +4 -2
- cirq/transformers/eject_phased_paulis.py +4 -3
- cirq/transformers/eject_phased_paulis_test.py +1 -1
- cirq/transformers/eject_z.py +2 -1
- cirq/transformers/eject_z_test.py +1 -1
- cirq/transformers/gauge_compiling/cphase_gauge.py +5 -5
- cirq/transformers/gauge_compiling/cz_gauge.py +4 -4
- cirq/transformers/gauge_compiling/gauge_compiling.py +9 -9
- cirq/transformers/gauge_compiling/gauge_compiling_test.py +8 -6
- cirq/transformers/gauge_compiling/gauge_compiling_test_utils.py +2 -2
- cirq/transformers/gauge_compiling/gauge_compiling_test_utils_test.py +2 -1
- cirq/transformers/gauge_compiling/iswap_gauge.py +2 -2
- cirq/transformers/gauge_compiling/spin_inversion_gauge.py +2 -2
- cirq/transformers/gauge_compiling/sqrt_cz_gauge.py +5 -5
- cirq/transformers/gauge_compiling/sqrt_iswap_gauge.py +3 -2
- cirq/transformers/heuristic_decompositions/gate_tabulation_math_utils.py +2 -1
- cirq/transformers/heuristic_decompositions/gate_tabulation_math_utils_test.py +1 -1
- cirq/transformers/heuristic_decompositions/two_qubit_gate_tabulation.py +4 -4
- cirq/transformers/heuristic_decompositions/two_qubit_gate_tabulation_test.py +4 -4
- cirq/transformers/insertion_sort.py +1 -1
- cirq/transformers/merge_k_qubit_gates.py +2 -2
- cirq/transformers/merge_single_qubit_gates.py +1 -1
- cirq/transformers/noise_adding.py +4 -3
- cirq/transformers/noise_adding_test.py +3 -2
- cirq/transformers/optimize_for_target_gateset.py +1 -1
- cirq/transformers/optimize_for_target_gateset_test.py +2 -1
- cirq/transformers/randomized_measurements.py +2 -1
- cirq/transformers/randomized_measurements_test.py +2 -1
- cirq/transformers/routing/initial_mapper.py +1 -1
- cirq/transformers/routing/initial_mapper_test.py +1 -0
- cirq/transformers/routing/line_initial_mapper.py +3 -2
- cirq/transformers/routing/mapping_manager.py +2 -2
- cirq/transformers/routing/mapping_manager_test.py +2 -2
- cirq/transformers/routing/route_circuit_cqc.py +3 -2
- cirq/transformers/routing/route_circuit_cqc_test.py +2 -1
- cirq/transformers/routing/visualize_routed_circuit.py +1 -0
- cirq/transformers/routing/visualize_routed_circuit_test.py +1 -0
- cirq/transformers/stratify.py +2 -2
- cirq/transformers/synchronize_terminal_measurements.py +2 -1
- cirq/transformers/target_gatesets/compilation_target_gateset.py +1 -2
- cirq/transformers/target_gatesets/compilation_target_gateset_test.py +2 -0
- cirq/transformers/target_gatesets/cz_gateset.py +1 -1
- cirq/transformers/target_gatesets/cz_gateset_test.py +4 -2
- cirq/transformers/target_gatesets/sqrt_iswap_gateset.py +1 -1
- cirq/transformers/target_gatesets/sqrt_iswap_gateset_test.py +3 -2
- cirq/transformers/transformer_api.py +5 -4
- cirq/transformers/transformer_api_test.py +3 -3
- cirq/transformers/transformer_primitives.py +3 -4
- cirq/transformers/transformer_primitives_test.py +1 -0
- cirq/value/abc_alt.py +1 -2
- cirq/value/angle.py +2 -0
- cirq/value/classical_data.py +1 -0
- cirq/value/digits.py +1 -1
- cirq/value/duration.py +3 -3
- cirq/value/duration_test.py +2 -1
- cirq/value/linear_dict.py +2 -1
- cirq/value/measurement_key.py +1 -2
- cirq/value/periodic_value.py +0 -1
- cirq/value/probability.py +1 -0
- cirq/value/random_state.py +1 -1
- cirq/value/timestamp_test.py +2 -1
- cirq/value/value_equality_attr.py +1 -1
- cirq/vis/density_matrix.py +1 -1
- cirq/vis/density_matrix_test.py +2 -5
- cirq/vis/heatmap.py +0 -1
- cirq/vis/heatmap_test.py +2 -3
- cirq/vis/histogram.py +1 -1
- cirq/vis/histogram_test.py +1 -2
- cirq/vis/state_histogram.py +4 -2
- cirq/vis/state_histogram_test.py +2 -2
- cirq/work/collector.py +1 -1
- cirq/work/observable_grouping.py +2 -2
- cirq/work/observable_measurement.py +3 -3
- cirq/work/observable_measurement_data.py +2 -2
- cirq/work/observable_measurement_test.py +8 -8
- cirq/work/observable_readout_calibration.py +2 -2
- cirq/work/observable_readout_calibration_test.py +2 -1
- cirq/work/observable_settings.py +6 -6
- cirq/work/observable_settings_test.py +2 -2
- cirq/work/pauli_sum_collector.py +1 -1
- cirq/work/sampler.py +2 -3
- cirq/work/sampler_test.py +1 -2
- cirq/work/zeros_sampler.py +1 -1
- {cirq_core-1.5.0.dev20250327175906.dist-info → cirq_core-1.5.0.dev20250327210023.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20250327175906.dist-info → cirq_core-1.5.0.dev20250327210023.dist-info}/RECORD +415 -415
- {cirq_core-1.5.0.dev20250327175906.dist-info → cirq_core-1.5.0.dev20250327210023.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20250327175906.dist-info → cirq_core-1.5.0.dev20250327210023.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20250327175906.dist-info → cirq_core-1.5.0.dev20250327210023.dist-info}/top_level.txt +0 -0
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from typing import
|
|
15
|
+
from typing import Any, Dict, Iterator, Sequence, TYPE_CHECKING
|
|
16
16
|
|
|
17
17
|
import numpy as np
|
|
18
|
+
|
|
19
|
+
from cirq.ops import raw_types
|
|
18
20
|
from cirq.ops.common_gates import H, ry
|
|
19
21
|
from cirq.ops.pauli_gates import X
|
|
20
|
-
from cirq.ops import raw_types
|
|
21
|
-
|
|
22
22
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
24
24
|
import cirq
|
cirq/ops/wait_gate.py
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
from typing import Any, Sequence, Tuple
|
|
15
|
-
from typing_extensions import Self
|
|
16
15
|
|
|
17
16
|
import numpy as np
|
|
18
17
|
import pytest
|
|
18
|
+
from typing_extensions import Self
|
|
19
19
|
|
|
20
20
|
import cirq
|
|
21
21
|
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"""A protocol for implementing high performance channel evolutions."""
|
|
16
16
|
|
|
17
17
|
from types import NotImplementedType
|
|
18
|
-
from typing import Any, Iterable, Optional, Sequence,
|
|
18
|
+
from typing import Any, Iterable, Optional, Sequence, Tuple, TypeVar, Union
|
|
19
19
|
|
|
20
20
|
import numpy as np
|
|
21
21
|
from typing_extensions import Protocol
|
|
22
22
|
|
|
23
23
|
from cirq import linalg
|
|
24
24
|
from cirq._doc import doc_private
|
|
25
|
+
from cirq.protocols import qid_shape_protocol
|
|
25
26
|
from cirq.protocols.apply_unitary_protocol import apply_unitary, ApplyUnitaryArgs
|
|
26
27
|
from cirq.protocols.kraus_protocol import kraus
|
|
27
|
-
from cirq.protocols import qid_shape_protocol
|
|
28
28
|
|
|
29
29
|
# This is a special indicator value used by the apply_channel method
|
|
30
30
|
# to determine whether or not the caller provided a 'default' argument. It must
|
|
@@ -22,9 +22,9 @@ from typing_extensions import Protocol
|
|
|
22
22
|
|
|
23
23
|
from cirq import linalg
|
|
24
24
|
from cirq._doc import doc_private
|
|
25
|
+
from cirq.protocols import qid_shape_protocol
|
|
25
26
|
from cirq.protocols.apply_unitary_protocol import apply_unitary, ApplyUnitaryArgs
|
|
26
27
|
from cirq.protocols.mixture_protocol import mixture
|
|
27
|
-
from cirq.protocols import qid_shape_protocol
|
|
28
28
|
|
|
29
29
|
# This is a special indicator value used by the apply_mixture method
|
|
30
30
|
# to determine whether or not the caller provided a 'default' argument. It must
|
|
@@ -12,14 +12,13 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
from fractions import Fraction
|
|
15
|
+
import numbers
|
|
17
16
|
from decimal import Decimal
|
|
17
|
+
from fractions import Fraction
|
|
18
|
+
from typing import Any, Iterable
|
|
18
19
|
|
|
19
|
-
import numbers
|
|
20
20
|
import numpy as np
|
|
21
21
|
import sympy
|
|
22
|
-
|
|
23
22
|
from typing_extensions import Protocol
|
|
24
23
|
|
|
25
24
|
from cirq._doc import doc_private
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from fractions import Fraction
|
|
16
15
|
from decimal import Decimal
|
|
16
|
+
from fractions import Fraction
|
|
17
17
|
from numbers import Number
|
|
18
|
+
|
|
18
19
|
import numpy as np
|
|
19
20
|
import pytest
|
|
20
21
|
import sympy
|
|
22
|
+
|
|
21
23
|
import cirq
|
|
22
24
|
|
|
23
25
|
|
|
@@ -16,15 +16,15 @@ import re
|
|
|
16
16
|
from fractions import Fraction
|
|
17
17
|
from typing import (
|
|
18
18
|
Any,
|
|
19
|
-
TYPE_CHECKING,
|
|
20
|
-
Optional,
|
|
21
|
-
Union,
|
|
22
|
-
TypeVar,
|
|
23
19
|
Dict,
|
|
24
|
-
overload,
|
|
25
20
|
Iterable,
|
|
26
21
|
List,
|
|
22
|
+
Optional,
|
|
23
|
+
overload,
|
|
27
24
|
Sequence,
|
|
25
|
+
TYPE_CHECKING,
|
|
26
|
+
TypeVar,
|
|
27
|
+
Union,
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
import numpy as np
|
|
@@ -11,13 +11,12 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
import itertools
|
|
15
14
|
import dataclasses
|
|
16
15
|
import inspect
|
|
16
|
+
import itertools
|
|
17
17
|
from collections import defaultdict
|
|
18
18
|
from types import NotImplementedType
|
|
19
19
|
from typing import (
|
|
20
|
-
TYPE_CHECKING,
|
|
21
20
|
Any,
|
|
22
21
|
Callable,
|
|
23
22
|
Dict,
|
|
@@ -28,12 +27,12 @@ from typing import (
|
|
|
28
27
|
overload,
|
|
29
28
|
Sequence,
|
|
30
29
|
Tuple,
|
|
30
|
+
TYPE_CHECKING,
|
|
31
31
|
TypeVar,
|
|
32
32
|
Union,
|
|
33
33
|
)
|
|
34
|
-
from typing_extensions import runtime_checkable
|
|
35
34
|
|
|
36
|
-
from typing_extensions import Protocol
|
|
35
|
+
from typing_extensions import Protocol, runtime_checkable
|
|
37
36
|
|
|
38
37
|
from cirq import devices, ops
|
|
39
38
|
from cirq._doc import doc_private
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
|
|
15
15
|
from typing import Any, Optional
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
from cirq.ops.dense_pauli_string import DensePauliString
|
|
19
|
-
from cirq._import import LazyLoader
|
|
20
|
-
import cirq.protocols.unitary_protocol as unitary_protocol
|
|
17
|
+
import cirq.protocols.decompose_protocol as decompose_protocol
|
|
21
18
|
import cirq.protocols.has_unitary_protocol as has_unitary_protocol
|
|
22
19
|
import cirq.protocols.qid_shape_protocol as qid_shape_protocol
|
|
23
|
-
import cirq.protocols.
|
|
20
|
+
import cirq.protocols.unitary_protocol as unitary_protocol
|
|
21
|
+
from cirq._import import LazyLoader
|
|
22
|
+
from cirq.ops.clifford_gate import SingleQubitCliffordGate
|
|
23
|
+
from cirq.ops.dense_pauli_string import DensePauliString
|
|
24
24
|
|
|
25
25
|
pauli_string_decomposition = LazyLoader(
|
|
26
26
|
"pauli_string_decomposition",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from typing import Any,
|
|
15
|
+
from typing import Any, Optional, TypeVar
|
|
16
16
|
|
|
17
17
|
import numpy as np
|
|
18
18
|
from typing_extensions import Protocol
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from typing import Any, List, overload, Tuple, TYPE_CHECKING, TypeVar, Union
|
|
15
|
+
from typing import Any, Iterable, List, overload, Tuple, TYPE_CHECKING, TypeVar, Union
|
|
16
16
|
|
|
17
17
|
from cirq import ops
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ import sympy
|
|
|
33
33
|
import cirq
|
|
34
34
|
from cirq._compat import proper_eq
|
|
35
35
|
from cirq.protocols import json_serialization
|
|
36
|
-
from cirq.testing.json import ModuleJsonTestSpec, spec_for
|
|
36
|
+
from cirq.testing.json import assert_json_roundtrip_works, ModuleJsonTestSpec, spec_for
|
|
37
37
|
|
|
38
38
|
REPO_ROOT = pathlib.Path(__file__).parent.parent.parent.parent
|
|
39
39
|
|
cirq/protocols/kraus_protocol.py
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
"""Protocol and methods for obtaining Kraus representation of quantum channels."""
|
|
16
16
|
|
|
17
|
+
import warnings
|
|
17
18
|
from types import NotImplementedType
|
|
18
19
|
from typing import Any, Sequence, Tuple, TypeVar, Union
|
|
19
|
-
import warnings
|
|
20
20
|
|
|
21
21
|
import numpy as np
|
|
22
22
|
from typing_extensions import Protocol
|
|
@@ -25,7 +25,6 @@ from cirq._doc import doc_private
|
|
|
25
25
|
from cirq.protocols.decompose_protocol import _try_decompose_into_operations_and_qubits
|
|
26
26
|
from cirq.protocols.mixture_protocol import has_mixture
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
# This is a special indicator value used by the channel method to determine
|
|
30
29
|
# whether or not the caller provided a 'default' argument. It must be of type
|
|
31
30
|
# Sequence[np.ndarray] to ensure the method has the correct type signature in
|
cirq/protocols/pow_protocol.py
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from typing import Any, Callable, Optional, overload,
|
|
15
|
+
from typing import Any, Callable, Optional, overload, TYPE_CHECKING, TypeVar, Union
|
|
16
16
|
|
|
17
17
|
if TYPE_CHECKING:
|
|
18
18
|
import cirq
|
cirq/protocols/qasm.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import string
|
|
16
16
|
from types import NotImplementedType
|
|
17
|
-
from typing import
|
|
17
|
+
from typing import Any, Dict, Iterable, Optional, Tuple, TYPE_CHECKING, TypeVar, Union
|
|
18
18
|
|
|
19
19
|
from typing_extensions import Protocol
|
|
20
20
|
|
|
@@ -18,7 +18,7 @@ from typing import Any, Sequence, Tuple, TypeVar, Union
|
|
|
18
18
|
from typing_extensions import Protocol
|
|
19
19
|
|
|
20
20
|
from cirq import ops
|
|
21
|
-
from cirq._doc import
|
|
21
|
+
from cirq._doc import doc_private, document
|
|
22
22
|
|
|
23
23
|
# This is a special indicator value used by the methods to determine whether or
|
|
24
24
|
# not the caller provided a 'default' argument. It must be of type
|
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
import numbers
|
|
16
16
|
from typing import AbstractSet, Any, cast, TYPE_CHECKING, TypeVar
|
|
17
|
-
from typing_extensions import Self
|
|
18
17
|
|
|
19
18
|
import sympy
|
|
20
|
-
from typing_extensions import Protocol
|
|
19
|
+
from typing_extensions import Protocol, Self
|
|
21
20
|
|
|
22
21
|
from cirq import study
|
|
23
22
|
from cirq._doc import doc_private
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from typing import Any,
|
|
15
|
+
from typing import Any, Optional, Sequence, TypeVar, Union
|
|
16
16
|
|
|
17
17
|
import numpy as np
|
|
18
18
|
from typing_extensions import Protocol
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
from types import NotImplementedType
|
|
16
|
-
from typing import Any, TypeVar, Union
|
|
16
|
+
from typing import Any, Optional, TypeVar, Union
|
|
17
17
|
|
|
18
18
|
import numpy as np
|
|
19
19
|
from typing_extensions import Protocol
|
|
20
20
|
|
|
21
21
|
from cirq._doc import doc_private
|
|
22
22
|
from cirq.protocols import qid_shape_protocol
|
|
23
|
-
from cirq.protocols.apply_unitary_protocol import
|
|
23
|
+
from cirq.protocols.apply_unitary_protocol import apply_unitaries, ApplyUnitaryArgs
|
|
24
24
|
from cirq.protocols.decompose_protocol import _try_decompose_into_operations_and_qubits
|
|
25
25
|
|
|
26
26
|
# This is a special indicator value used by the unitary method to determine
|
cirq/qis/clifford_tableau.py
CHANGED
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
import abc
|
|
16
16
|
from typing import Any, Dict, List, Optional, Sequence, TYPE_CHECKING
|
|
17
|
+
|
|
17
18
|
import numpy as np
|
|
18
19
|
|
|
19
20
|
from cirq import protocols
|
|
20
|
-
from cirq._compat import
|
|
21
|
+
from cirq._compat import _method_cache_name, cached_method, proper_repr
|
|
21
22
|
from cirq.qis import quantum_state_representation
|
|
22
23
|
from cirq.value import big_endian_int_to_digits, linear_dict, random_state
|
|
23
24
|
|
cirq/qis/entropy.py
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from concurrent.futures import ThreadPoolExecutor
|
|
16
15
|
from collections.abc import Sequence
|
|
16
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
17
17
|
from itertools import product
|
|
18
18
|
from typing import Any, Optional
|
|
19
19
|
|
cirq/qis/entropy_test.py
CHANGED
cirq/qis/measures.py
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"""Measures on and between quantum states and operations."""
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
from typing import Optional,
|
|
17
|
+
from typing import Optional, Tuple, TYPE_CHECKING
|
|
18
18
|
|
|
19
19
|
import numpy as np
|
|
20
20
|
|
|
21
|
-
from cirq import protocols, value
|
|
21
|
+
from cirq import _import, protocols, value
|
|
22
22
|
from cirq.qis.states import (
|
|
23
|
-
QuantumState,
|
|
24
23
|
infer_qid_shape,
|
|
25
24
|
quantum_state,
|
|
25
|
+
QuantumState,
|
|
26
26
|
validate_density_matrix,
|
|
27
27
|
validate_normalized_state_vector,
|
|
28
28
|
)
|
cirq/qis/noise_utils_test.py
CHANGED
|
@@ -16,13 +16,13 @@ import numpy as np
|
|
|
16
16
|
import pytest
|
|
17
17
|
|
|
18
18
|
from cirq.qis.noise_utils import (
|
|
19
|
-
|
|
19
|
+
average_error,
|
|
20
20
|
decay_constant_to_pauli_error,
|
|
21
|
+
decay_constant_to_xeb_fidelity,
|
|
22
|
+
decoherence_pauli_error,
|
|
23
|
+
pauli_error_from_t1,
|
|
21
24
|
pauli_error_to_decay_constant,
|
|
22
25
|
xeb_fidelity_to_decay_constant,
|
|
23
|
-
pauli_error_from_t1,
|
|
24
|
-
average_error,
|
|
25
|
-
decoherence_pauli_error,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
|
cirq/qis/states.py
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
"""Classes and methods for quantum states."""
|
|
16
16
|
|
|
17
|
-
from typing import Any, cast, Iterable, List, Optional, Sequence, Set, TYPE_CHECKING, Tuple, Union
|
|
18
17
|
import itertools
|
|
18
|
+
from typing import Any, cast, Iterable, List, Optional, Sequence, Set, Tuple, TYPE_CHECKING, Union
|
|
19
19
|
|
|
20
20
|
import numpy as np
|
|
21
21
|
|
|
@@ -23,9 +23,10 @@ from cirq import value
|
|
|
23
23
|
from cirq._doc import document
|
|
24
24
|
|
|
25
25
|
if TYPE_CHECKING:
|
|
26
|
-
import cirq
|
|
27
26
|
from numpy.typing import DTypeLike
|
|
28
27
|
|
|
28
|
+
import cirq
|
|
29
|
+
|
|
29
30
|
DEFAULT_COMPLEX_DTYPE = np.complex64
|
|
30
31
|
|
|
31
32
|
STATE_VECTOR_LIKE = Union[
|
cirq/sim/classical_simulator.py
CHANGED
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
|
|
19
|
-
from cirq.value import big_endian_int_to_bits
|
|
20
|
-
from cirq import sim
|
|
21
|
-
from cirq.sim.simulation_state import TSimulationState, SimulationState
|
|
16
|
+
from copy import copy, deepcopy
|
|
17
|
+
from typing import Any, Dict, Generic, List, Optional, Sequence, TYPE_CHECKING, Union
|
|
18
|
+
|
|
22
19
|
import numpy as np
|
|
23
20
|
|
|
21
|
+
from cirq import ops, qis, sim
|
|
22
|
+
from cirq.sim.simulation_state import SimulationState, TSimulationState
|
|
23
|
+
from cirq.value import big_endian_int_to_bits
|
|
24
|
+
|
|
24
25
|
if TYPE_CHECKING:
|
|
25
26
|
import cirq
|
|
26
27
|
|
|
@@ -18,7 +18,7 @@ import numpy as np
|
|
|
18
18
|
|
|
19
19
|
from cirq import ops, protocols, study, value
|
|
20
20
|
from cirq._compat import proper_repr
|
|
21
|
-
from cirq.sim import
|
|
21
|
+
from cirq.sim import density_matrix_simulation_state, simulator, simulator_base
|
|
22
22
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
24
24
|
import cirq
|
cirq/sim/density_matrix_utils.py
CHANGED
cirq/sim/mux.py
CHANGED
|
@@ -21,9 +21,9 @@ from typing import List, Optional, Sequence, Type, TYPE_CHECKING, Union
|
|
|
21
21
|
|
|
22
22
|
import numpy as np
|
|
23
23
|
|
|
24
|
-
from cirq import circuits,
|
|
24
|
+
from cirq import circuits, devices, ops, protocols, study, value
|
|
25
25
|
from cirq._doc import document
|
|
26
|
-
from cirq.sim import
|
|
26
|
+
from cirq.sim import density_matrix_simulator, sparse_simulator
|
|
27
27
|
from cirq.sim.clifford import clifford_simulator
|
|
28
28
|
from cirq.transformers import measurement_transformers
|
|
29
29
|
|
cirq/sim/simulation_state.py
CHANGED
|
@@ -24,16 +24,15 @@ from typing import (
|
|
|
24
24
|
Optional,
|
|
25
25
|
Sequence,
|
|
26
26
|
Set,
|
|
27
|
-
TypeVar,
|
|
28
|
-
TYPE_CHECKING,
|
|
29
27
|
Tuple,
|
|
28
|
+
TYPE_CHECKING,
|
|
29
|
+
TypeVar,
|
|
30
30
|
)
|
|
31
|
-
from typing_extensions import Self
|
|
32
31
|
|
|
33
32
|
import numpy as np
|
|
33
|
+
from typing_extensions import Self
|
|
34
34
|
|
|
35
35
|
from cirq import ops, protocols, value
|
|
36
|
-
|
|
37
36
|
from cirq.sim.simulation_state_base import SimulationStateBase
|
|
38
37
|
|
|
39
38
|
TState = TypeVar('TState', bound='cirq.QuantumStateRepresentation')
|
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
import pytest
|
|
15
|
-
|
|
16
14
|
import numpy as np
|
|
15
|
+
import pytest
|
|
17
16
|
|
|
18
|
-
from cirq.sim import simulation_utils
|
|
19
17
|
from cirq import testing
|
|
18
|
+
from cirq.sim import simulation_utils
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
@pytest.mark.parametrize('n,m', [(n, m) for n in range(1, 4) for m in range(1, n + 1)])
|
cirq/sim/simulator_base.py
CHANGED
|
@@ -20,15 +20,15 @@ from typing import (
|
|
|
20
20
|
Any,
|
|
21
21
|
cast,
|
|
22
22
|
Dict,
|
|
23
|
-
Iterator,
|
|
24
23
|
Generic,
|
|
24
|
+
Iterator,
|
|
25
25
|
List,
|
|
26
26
|
Optional,
|
|
27
27
|
Sequence,
|
|
28
28
|
Tuple,
|
|
29
29
|
Type,
|
|
30
|
-
TypeVar,
|
|
31
30
|
TYPE_CHECKING,
|
|
31
|
+
TypeVar,
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
import numpy as np
|
|
@@ -38,13 +38,13 @@ from cirq.sim.simulation_product_state import SimulationProductState
|
|
|
38
38
|
from cirq.sim.simulation_state import TSimulationState
|
|
39
39
|
from cirq.sim.simulation_state_base import SimulationStateBase
|
|
40
40
|
from cirq.sim.simulator import (
|
|
41
|
-
|
|
41
|
+
check_all_resolved,
|
|
42
42
|
SimulatesIntermediateState,
|
|
43
43
|
SimulatesSamples,
|
|
44
|
-
StepResult,
|
|
45
44
|
SimulationTrialResult,
|
|
46
|
-
check_all_resolved,
|
|
47
45
|
split_into_matching_protocol_then_general,
|
|
46
|
+
StepResult,
|
|
47
|
+
TSimulationTrialResult,
|
|
48
48
|
)
|
|
49
49
|
|
|
50
50
|
if TYPE_CHECKING:
|