Comments (5)
Hi, thank you for raising an issue for this.
Can I ask which OS you are using? This may be a platform dependent issue as I do not get the assertion failure when I run your code snippet on my mac.
from tket.
Hi, thank you for raising an issue for this.
Can I ask which OS you are using? This may be a platform dependent issue as I do not get the assertion failure when I run your code snippet on my mac.
Hi, thank you very much for your fast response. I actually do also use a mac with MacOs 13.0.1. Not sure if it helps, but I use pytket-qiskit v0.31.0, qiskit-terra v0.22.2 and qiskit v0.39.2.
from tket.
Hi,
I am not sure of the exact reason for the assertion failure in this case as I can't reproduce the error. I suspect it comes from small parameter values in the phase estimation circuit.
I think we should investigate this behaviour further. After discussing this I think we will remove this assertion in a future release and make it warning instead.
Its possible to change the target gateset of the FullPeepholeOptimise
to target TK2 gates by using
FullPeepholeOptimise(target_2qb_gate=OpType.TK2).apply(qc_tket)
Do you still get the error message if you target TK2 gates? I think this may bypass the replace_TK2_2CX
.
from tket.
Hi,
for me there was a threshold regarding num_evaluation_qubits
from which the error started to appear - maybe increasing it e.g., to 50, would also trigger the error in your setup.
Thanks for that suggestion, it avoids the error message. Would you be able to give an estimate in how far the added parameter affects the resulting optimization quality?
from tket.
Hi,
I would have thought that increasing the number of evaluation qubits may reproduce the error as well. However I can increase the number up to 90 without seeing the issue which surprised me.
Regarding targetting TK2 vs CX....
If I run your original code snippet targeting CX gates with FullPeepholeOptimise
I get a circuit with
#total gates = 1968
#CX gates = 861
CX depth = 117
If Instead I target TK2 gates with the same example I get the following
#total gates = 1017
#TK2 gates = 445
TK2 depth = 67
The improvement in gate count/depth with TK2 is expected as it is a parameterised gate and therefore more expressive than CX.
As for which one is better I suppose it depends on the emulator/device that you're using. TK2 gates were added as an intermediate step to target the Quantinuum device gate set whereas CX gates are native to IBM devices.
from tket.
Related Issues (20)
- wrong error message with ZZPhase added to circuit
- Add `FullyConnected` to json schema and add tests for serialization
- Implement `get_unitary()` for all box types
- Add semantic equality checks for `CircBox`
- PhasePolyBox doesn't work well with custom registers
- Add OpTypes for CS and CSdg
- More efficient decompositions of (multi-)controlled `PauliExpBox`es
- Implement `get_box_unitary()` for `ToffoliBox`
- Incorrect result after `redundancy_removal` pass HOT 2
- Docstring for `RoundAngles` pass not appearing in generated docs HOT 2
- [Question] `NoiseAwarePlacement` for single-qubit gates HOT 1
- Problems installing pytket >= 1.11.1 on MacOS in a conda environment HOT 1
- Add option to `auto_rebase_pass()` to allow implicit swaps
- Incorrect assignment in NoiseAwarePlacement
- Add IBM {X, SX, Rz, ECR} gateset to `auto_rebase_pass` HOT 1
- Add python binding for `Op.is_clifford()`
- Improve performance of `ToffoliBox::get_unitary()` HOT 1
- Add new `get_operator_distribution` utils method HOT 7
- Empty Backend Result not possible
- `FullPeepholeOptimise` with TK2 target runs forever on a small symbolic circuit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tket.