-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Small update to the Python API (#76)
This PR contains a few small updates to the Python API for convenience. Essentially it simply exposes the following methods: * `VecGraph`: * `.adjoint` * `.plug` * `.clone` * `Decomposer`: * `.done` * `.save` * `.decomp_parallel` --------- Co-authored-by: Rafael Haenel <rhaenel@photonic.com>
- Loading branch information
1 parent
c13bf87
commit a7c3080
Showing
7 changed files
with
72 additions
and
21 deletions.
There are no files selected for viewing
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,13 +1,7 @@ | ||
from . import _quizx, simplify | ||
from . import simplify | ||
from .graph import VecGraph | ||
from .circuit import Circuit | ||
from .circuit import Circuit, extract_circuit | ||
from .decompose import Decomposer | ||
from ._quizx import Scalar | ||
|
||
__all__ = ["VecGraph", "Circuit", "simplify", "Decomposer", "Scalar"] | ||
|
||
|
||
def extract_circuit(g): | ||
c = Circuit() | ||
c._c = _quizx.extract_circuit(g._g) | ||
return c | ||
__all__ = ["VecGraph", "Circuit", "simplify", "Decomposer", "Scalar", "extract_circuit"] |
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