decompose() new parameters provide decompose multiple time, or till the end
See original GitHub issueWhat should we add?
example:
circuit.decompose().decompose().decompose().decompose().decompose()
can be something like:
circuit.decompose(reps = 5) # repeat decompose 5 times
why: I found it useful when decompose initialize state, and see how gate change each decompose
- repeat decompose #8142
- repeat gates_to_decompose
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Multi-Seasonal Time Series Decomposition using MSTL in ...
It is a method to decompose a time series into a trend component, multiple seasonal components, and a residual component. MSTL assumes that...
Read more >How to Decompose Time Series Data into Trend and ...
Time series decomposition involves thinking of a series as a combination of level, trend, seasonality, and noise components. Decomposition ...
Read more >decompose() for time series: ValueError: You must specify a ...
The period parameter that is set with an integer means the number of cycles which you expect to be in the data. If...
Read more >Time series decomposition gives unexpected results
Logic Used: Jan = 5, Increase by 5 till June, Decrease by 5 after that. Next year, add 1 to each value. Run...
Read more >Introduction To Time Series In R: The Decompose Function
When developing time series models it can be helpful to understand the nature of the various patterns that exist inside the data.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I explained in the other PR - I don’t see a need for any modification to
gates_to_decompose
here, and I think adding it would confuse the interface of a generally simple function. I’ll close the re-opened part of this issue (as it’s effectively a feature request) as “won’t fix”, but thanks for the initial PR!This seems both easy to implement and a simple shorthand for people. In general,
decompose
isn’t the best way of translating between basis gates (theBasisTranslator
transpiler pass is our preferrred method now), but I do know people still usedecompose
as a quick check.I’d be happy to accept a PR on this that adds
reps
as the keyword argument inQuantumCircuit.decompose
- it just needs to loop over the call to theDecomposer
pass that many times.