Skip to content
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

Create Paulis of specific number of qubits #375

Open
dsvandet opened this issue Jun 14, 2023 · 2 comments
Open

Create Paulis of specific number of qubits #375

dsvandet opened this issue Jun 14, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dsvandet
Copy link
Collaborator

dsvandet commented Jun 14, 2023

Consider trying to create the following Pauli on 100 qubits: Z0 or in product form IIIII...IIIIZ with 99 I's. If you do the following

Pauli("Z0")

you will get simply Z0 on one qubit. Instead, add the optional parameter num_qubits and do the following:

Pauli("Z_0", num_qubits = 100)

or

Pauli("Z", num_qubits = 100)

For Z_5 on 8 qubits the the code

Pauli("Z5", num_qubits = 8)

should produce the Pauli "IIZIIIII"

Note that you can do this in a Hack way by first creating

PauliList(["IIIIIIII", "Z5"])

and then extracting the Pauli of interest.

We should also add this functionality to PauliList.

@dsvandet dsvandet added enhancement New feature or request good first issue Good for newcomers labels Jun 14, 2023
@nitin-pandita
Copy link

Hey @dsvandet i would like to work on it

@grace-harper
Copy link
Collaborator

If you're still interested, that's great. Please feel free to let us know if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants