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

Make LRE compatible with non-cirq circuits #2416

Closed
Tracked by #2223
purva-thakre opened this issue Jun 21, 2024 · 0 comments · Fixed by #2547
Closed
Tracked by #2223

Make LRE compatible with non-cirq circuits #2416

purva-thakre opened this issue Jun 21, 2024 · 0 comments · Fixed by #2547
Assignees
Labels
lre Layerwise Richardson Extrapolation
Milestone

Comments

@purva-thakre
Copy link
Collaborator

purva-thakre commented Jun 21, 2024

As discussed in another PR: #2347 (comment)

Two different ways to implement the optional args led to errors. Either the one_to_many argument was ignored (first code block) or _pop_measurement was used on a Qiskit circuit instead of converting the circuit to a cirq circuit first (second code block).

@accept_qprogram_and_validate
def multivariate_layer_scaling( input_circuit, degree, ............, one_to_many = True)

Similar to how the optional arg is used in PEC, I also tried changing multivariate_layer_scaling to _cirq_multivariate_layer_scaling such that the new multivariate_layer_scaling only accepted a QPROGRAM as input.

 noise_scaling_func = accept_qprogram_and_validate(
      _cirq_multivariate_layer_scaling,
      one_to_many=True,
  )
  scaled_circuits = noise_scaling_func(
      input_circuit, degree, fold_multiplier, num_chunks, folding_method
  )
 return scaled_circuits
@purva-thakre purva-thakre self-assigned this Jun 21, 2024
@purva-thakre purva-thakre added the lre Layerwise Richardson Extrapolation label Jun 21, 2024
@purva-thakre purva-thakre changed the title Make LRE functions compatible with non-cirq circuits Make LRE compatible with non-cirq circuits Jun 21, 2024
@natestemen natestemen added this to the 0.41.0 milestone Oct 10, 2024
@natestemen natestemen self-assigned this Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lre Layerwise Richardson Extrapolation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants