Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import
transformers/analytical_decompositions/*
methods in `optimiz…
…ers/*` (quantumlib#4813) After the recent migration of decompositions from `optimizers/*` to `transformers/analytical_decompositions/*`, the following user code breaks despite deprecating the moved submodules. ```python from cirq import optimizers from cirq.optimizers import two_qubit_decompositions _ = two_qubit_decompositions.two_qubit_matrix_to_operations(mat) # This is deprecated correctly and will emit a deprecation warning but work as expected. _ = optimizers.two_qubit_matrix_to_operations(mat) # This would currently break since the optimizers module is neither deprecated nor has these top-level objects available ``` This PR adds a fix to temporarily unbreak the above user code by importing top-level objects from `transformers/analytical_decompositions/*` to `optimizers/*`. Once all files from `optimizers/*` have been moved to `transformers/`, we will deprecate the `optimizers/` module, and then this hack can be reverted and the correct deprecation warnings will be emitted when using `optimizers.two_qubit_matrix_to_operations` (and other top-level objects). Part of quantumlib#4722
- Loading branch information