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

[WIP] Layer Fidelity Extensions #1517

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[WIP] Layer Fidelity Extensions #1517

wants to merge 2 commits into from

Conversation

dcmckayibm
Copy link
Collaborator

Some tweaks to the layer fidelity code to allow more flexibility in experiments.

  • Relax the barrier constraint so that the code does something more similar to standard sim RB
  • Add a minimum 2Q gate length so that one can force the delay of the barrier

Comment on lines +155 to +158
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines +234 to +236
#optional items for the circuit generation
self.layer_barrier = layer_barrier
self.min_delay = min_delay
Copy link
Collaborator

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]
Copy link
Collaborator

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)
Copy link
Collaborator

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
Copy link
Collaborator

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:
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants