-
Notifications
You must be signed in to change notification settings - Fork 127
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
[WIP] Layer Fidelity Extensions #1517
base: main
Are you sure you want to change the base?
Conversation
layer_barrier: Optional, enforce a barrier across the whole layer. Default is True | ||
which is the defined protocol for layer. But can be set to false for testing. | ||
min_delay: Option. Define a minimum delay in each layer in units of dt. This | ||
delay operation will be applied in any 1Q edge of the layer. |
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.
layer_barrier: Optional, enforce a barrier across the whole layer. Default is True | |
which is the defined protocol for layer. But can be set to false for testing. | |
min_delay: Option. Define a minimum delay in each layer in units of dt. This | |
delay operation will be applied in any 1Q edge of the layer. | |
layer_barrier: Optional, enforce a barrier across the whole layer. Default is True | |
which is the defined protocol for layer. But can be set to false for testing. | |
min_delay: Option. Define a minimum delay in each layer in units of dt. This | |
delay operation will be applied in any 1Q edge of the layer. |
#optional items for the circuit generation | ||
self.layer_barrier = layer_barrier | ||
self.min_delay = min_delay |
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.
These should probably be experiment options like lengths, seed, etc.
for one_q in one_qubits: | ||
barrier_inst_gate.append(CircuitInstruction(Barrier(1), [circ.qubits[one_q]])) | ||
else: | ||
barrier_inst_gate = [barrier_inst] |
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.
Minor -- barrier_inst
vs barrier_inst_gate
is a little confusing. Maybe barriest_inst
could be something like full_barrier
?
#if there is a min_delay, just need | ||
#to add to one of the qubits | ||
if min_delay is not None and k==0: | ||
circ.delay(min_delay,q) |
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.
It looks weird now to loop over a list and then only do something for the first item instead of something like if min_delay and one_qubits: circ.delay(min_delay, one_qubits[0])
but I guess the loop is there for adding DD.
@@ -150,6 +152,10 @@ def __init__( | |||
one_qubit_basis_gates: Optional, 1q-gates to use for implementing 1q-Clifford operations. | |||
If not specified (but ``backend`` is supplied), | |||
all 1q-gates supported in the backend are automatically set. | |||
layer_barrier: Optional, enforce a barrier across the whole layer. Default is True | |||
which is the defined protocol for layer. But can be set to false for testing. | |||
min_delay: Option. Define a minimum delay in each layer in units of dt. This |
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 is the motivation for using min_delay
? Maybe more description here would help? It adds some extra delay after all the 2q gates for debugging of some duration effect? It seems like does not work well with layer_barrier=False
?
circ._append(barrier_inst) | ||
#if there is a min_delay, just need | ||
#to add to one of the qubits | ||
if min_delay is not None and k==0: |
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 if you have physical_qubits=[0, 1, 2, 3]
and two_qubit_layers=[[(0, 1), (2, 3)]]
? Won't one_qubits
be empty and min_delay
silently ignored?
Some tweaks to the layer fidelity code to allow more flexibility in experiments.