-
Notifications
You must be signed in to change notification settings - Fork 80
Refactor Gate class (1) #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
b775d2c
Removed unused variables and minor corrections
mudit06mah c312fbb
Merge pull request #311 from mudit06mah/zzcrosstalk
BoxiLi a8f1e61
Depreciate N in QubitCircuit and use num_qubits instead
niranjannagumalli a28fd3c
Replace qc.N with qc.num_qubits in the codebase
niranjannagumalli a0f4e0e
Depreciated N in gatecompiler
niranjannagumalli fccb49b
Replaced N with num_qubits in texrenderer
niranjannagumalli 7b5a012
Replace N with num_qubits in convertor.py and fix linting
niranjannagumalli 14dd774
Replaced get_compact_qobj with get_qobj
Mayank447 8ac2358
Added num_params property and validate_params abstract method for Par…
Mayank447 a678aeb
Made num_qubits, num_ctrl_qubits, num_param a class attribute instead…
Mayank447 d23204a
Added GateReadOnlyMeta class for certain gate attributes
Mayank447 fdc56ed
Made arg_value an iterable in Parametric Gate
Mayank447 95de51d
Skip __init__subclass checks for abstract classes
Mayank447 be0b0cb
Replace num_qubits argument with positional argument in QubitCircuit …
niranjannagumalli 7cf6a2e
Update qip-qiskit.rst to use num_qubits argument in CircularSpinChain…
niranjannagumalli c3bbef7
Removed usage of gates.py in codebase and deprecated them
Mayank447 4fe70fe
Added more checks to _init_subclass__ in Gate
Mayank447 4c5ac19
Shifted num_ctrl_qubits from Gate class to ControlledGate class
Mayank447 8a88790
Made num_qubits, num_params property with abstract method
Mayank447 90d650b
Renamed ParametrizedGat to ParametricGate
Mayank447 663752e
Added an abstract method target_class to ControlledGate
Mayank447 4b391d7
Removed target_class from ControlledParam Gate
Mayank447 435abc1
Added typing.py
Mayank447 a78f982
Added additional checks for ControlledGate
Mayank447 5df2b4a
Made validate_params method abstract for ParametricGate
Mayank447 cbcee00
Replaced string gate input to add_gate to gate class in codebase
Mayank447 a837d89
Removed __all__ from individual files in algorithms
Mayank447 de63be8
Added is_controlled_gate and is_parametric_gate methods to the gate c…
Mayank447 46c02cd
Made the qubit conversion logic for qiskit circuit same as qutip (no …
Mayank447 aa9a70e
Split std_gates into single_qubit gates
Mayank447 74f6cee
Split two qubit gates from std_gates.py
Mayank447 7670b08
Remove unused code from the split
Mayank447 151b98c
Finalize gate split to std
Mayank447 0d473e5
Remove unused imports
Mayank447 2eb5949
Added self-inverse property to Gate class
Mayank447 fcf1d8b
Added is_clifford propoerty to the Gate class
Mayank447 191db06
Added deprecation warning for gate input as string in add_gate method
Mayank447 f03e48b
Added deprecation warning for arg_value, arg_label and control_value …
Mayank447 7d8fd89
Replaced * imports with std.
Mayank447 73a679b
Added docstring for Gate class, ControlledGate class
Mayank447 875c41d
Added docstring for ParametricGate class
Mayank447 e0c904a
Renamed ControlledParamGate to ControlledParametricGate and added the…
Mayank447 8c76e79
Deprecated SNOT, CSIGN
Mayank447 9e49b0f
Deprecated CNOT gate and replaced with CX
Mayank447 ad6a19f
Removed ControlledParametricGate class, moved that functionality in C…
Mayank447 2c6630f
Merge pull request #317 Replace n with num qubits
BoxiLi 1feae75
Replaced SQRTNOT with SQRTX
Mayank447 8f6bd83
Merge branch 'master' into refactor-gate-class
Mayank447 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,5 +1,15 @@ | ||
| from .qft import * | ||
| from .qpe import * | ||
| from .bit_flip import * | ||
| from .phase_flip import * | ||
| from .shor_code import * | ||
| from .qft import qft, qft_steps, qft_gate_sequence | ||
| from .qpe import qpe | ||
| from .bit_flip import BitFlipCode | ||
| from .phase_flip import PhaseFlipCode | ||
| from .shor_code import ShorCode | ||
|
|
||
| __all__ = [ | ||
| "qft", | ||
| "qft_steps", | ||
| "qft_gate_sequence", | ||
| "qpe", | ||
| "BitFlipCode", | ||
| "PhaseFlipCode", | ||
| "ShorCode", | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.