-
Notifications
You must be signed in to change notification settings - Fork 123
Adding ReCirq for Lattice Gauge Theory paper accepted to Nature #383
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
base: master
Are you sure you want to change the base?
Conversation
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.
Wow, thanks Tyler!! This is very thorough! I also sent you some very minor comments on the .ipynb notebook.
@dstrain115 I don't have write access to this repo, so maybe you could take a look when you get a chance? |
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.
What do you think of "lattice_gauge" instead of "lgt_strings"? It might be easier to figure out what a directory name like that means rather than a guess at the abbreviation.
recirq/lgt_strings/lgt_experiment.py
Outdated
@@ -0,0 +1,1267 @@ | |||
from collections.abc import Iterator, Sequence |
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.
Please add copyright and apache declaration. See elsewhere in Recirq for an example.
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.
done in new commit
@@ -0,0 +1,171 @@ | |||
import cirq |
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.
Please add copyright and apache declaration.
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.
done in new commit
recirq/lgt_strings/lgt_experiment.py
Outdated
|
||
Args: | ||
a_set: set of input qubits, usually ancillary qubits of a set of plaquettes. | ||
qubit1_relationship: either "a", "u", "r", "d", or "l". indicated that the first qubit in each pair will either |
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.
Optional: It might be better to have this as an enum rather than a string, but it's not strictly necessary if that's a large change.
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.
done. in new commit I introduce class QubitNeighbor(Enum)
recirq/lgt_strings/lgt_experiment.py
Outdated
the qubits in a_set. | ||
qubit2_relationship: ... same but the second qubit in each pair. | ||
""" | ||
if qubit1_relationship == "a": |
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.
I wonder if it would be better to have a dictionary with some representation that represents the displacement rather than painfully have hundreds of lines of if/then. For instance displacement["a"]["u"] = (0, -1/2) represents no displacement in column but -1/2 displacement in row_vector.
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.
good suggestion. fixed in new commit
recirq/lgt_strings/lgt_experiment.py
Outdated
def trotter_odd_zcol_entangle_minimal_qubits( | ||
grid: LGTGrid, extra_z_plaquette_indices: list[tuple[int, int]] = [] | ||
): | ||
"""Minimal qubits need not obey device connectivity, used for simulation. |
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.
This description could be improved. I am not sure what this function does from this sentence.
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.
fixed in new commit
recirq/lgt_strings/lgt_experiment.py
Outdated
def trotter_even_xcol_entangle_minimal_qubits( | ||
grid: LGTGrid, extra_plaquette_indices: list[tuple[int, int]] = [] | ||
): | ||
"""Minimal qubits need not obey device connectivity, used for simulation. |
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.
Same here. This is the exact same description as the previous function. What's the difference?
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.
fixed in new commit
recirq/lgt_strings/lgt_experiment.py
Outdated
def trotter_odd_xcol_entangle_minimal_qubits( | ||
grid: LGTGrid, extra_plaquette_indices: list[tuple[int, int]] = [] | ||
): | ||
"""Minimal qubits need not obey device connectivity, used for simulation. |
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.
Same description.
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.
fixed in new commit
recirq/lgt_strings/lgt_experiment.py
Outdated
|
||
def excitation_sep_plaquette_input( | ||
plaq_data: np.ndarray, plaq_rows: int = 3, plaq_cols: int = 2 | ||
) -> np.ndarray: |
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.
Missing docstring.
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.
fixed in new commit
recirq/lgt_strings/lgt_experiment.py
Outdated
import numpy as np | ||
import sympy | ||
|
||
class LGTGrid: |
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.
This is a pretty long file. Should we move LGTGrid into its own file?
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.
done in new commit
@dstrain115 Should we assign this PR to you? |
Done |
In this Recirq Tutorial, I have outlined cirq simulations of the experiments that I conducted as a hardware resident at Google quantum AI. These results are outlined in the arXiv posting https://arxiv.org/abs/2409.17142.