forked from quantumlib/Cirq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement and enforce explicit re-export for cirq modules (quantumlib…
…#6722) * Enable and enforce the `no_implicit_reexport` mypy rule for cirq modules * Update `__init__.py` files so they explicitly re-export public symbols, but do not re-export local symbols or submodules already in parent namespace * Fix few instances of imports from incorrect modules Fixes quantumlib#6717 --------- Co-authored-by: Pavol Juhas <juhas@google.com>
- Loading branch information
1 parent
e00c56c
commit 370cd88
Showing
47 changed files
with
1,705 additions
and
1,365 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
# pylint: disable=wrong-or-nonexistent-copyright-notice | ||
from cirq.contrib.quimb.state_vector import ( | ||
circuit_for_expectation_value, | ||
tensor_expectation_value, | ||
circuit_to_tensors, | ||
tensor_state_vector, | ||
tensor_unitary, | ||
circuit_for_expectation_value as circuit_for_expectation_value, | ||
tensor_expectation_value as tensor_expectation_value, | ||
circuit_to_tensors as circuit_to_tensors, | ||
tensor_state_vector as tensor_state_vector, | ||
tensor_unitary as tensor_unitary, | ||
) | ||
|
||
from cirq.contrib.quimb.density_matrix import ( | ||
tensor_density_matrix, | ||
circuit_to_density_matrix_tensors, | ||
tensor_density_matrix as tensor_density_matrix, | ||
circuit_to_density_matrix_tensors as circuit_to_density_matrix_tensors, | ||
) | ||
|
||
from cirq.contrib.quimb.grid_circuits import simplify_expectation_value_circuit, get_grid_moments | ||
from cirq.contrib.quimb.grid_circuits import ( | ||
simplify_expectation_value_circuit as simplify_expectation_value_circuit, | ||
get_grid_moments as get_grid_moments, | ||
) | ||
|
||
from cirq.contrib.quimb.mps_simulator import ( | ||
MPSOptions, | ||
MPSSimulator, | ||
MPSSimulatorStepResult, | ||
MPSState, | ||
MPSTrialResult, | ||
MPSOptions as MPSOptions, | ||
MPSSimulator as MPSSimulator, | ||
MPSSimulatorStepResult as MPSSimulatorStepResult, | ||
MPSState as MPSState, | ||
MPSTrialResult as MPSTrialResult, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.