-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add qubit state generation, truncation and expansion. #91
base: master
Are you sure you want to change the base?
Conversation
e2a89ed
to
b1aaea1
Compare
@purva-thakre If you have time, would you like to take a review on this PR? Maybe the |
@BoxiLi Sure, I could take a look (might take me a couple of days). |
|
||
|
||
def _find_reduced_indices(dims): | ||
"""Find the forresponding indices for a given qu""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Find the forresponding indices for a given qu""" | |
"""Find all the qubit indices for a given dimension, e.g. ``[3, 4]``""" |
Support a more general way of definition: - use a list or a string for zero/one/plus/minus state - use a list of integers for defining arbitrary disentangled quantum states (up to a global phase).
Changes
N
is removed. It does not make sense to expand the input with zero states under the new definition. The number of the qubits should just be the same as the length of the input.Question
Should the name be
qubit_states
orqubit_state
?