`Y^-0.5` not being converted to `PhasedX(-0.5)^0.5` on Ion related tests in Windows.
See original GitHub issueAs a reference: https://travis-ci.com/quantumlib/Cirq/jobs/201514754
For test_convert_to_ion_circuit
E AssertionError: Circuit's text diagram differs from the desired diagram.
E
E Diagram of actual circuit:
E (0, 0): βββXβββββββMS(0.25Ο)βββX^-0.5ββββββββββMS(0.25Ο)βββ
E β β
E (0, 1): βββY^0.5βββMS(0.25Ο)βββY^-0.5βββS^-1βββMS(0.25Ο)βββ
E
E Desired text diagram:
E (0, 0): βββXβββββββMS(0.25Ο)βββX^-0.5βββββββββββββββββββββMS(0.25Ο)βββ
E β β
E (0, 1): βββY^0.5βββMS(0.25Ο)βββPhasedX(-0.5)^0.5βββS^-1βββMS(0.25Ο)βββ
E
E Highlighted differences:
E (0, 0): βββXβββββββMS(0.25Ο)βββX^-0.5βββββββββββββββββββββββββββββββββ
E β ββββββββββββ
E (0, 1): βββY^0.5βββMS(0.25Ο)ββββββββββββββββββββββββββββββββββββββββββ
For test_decomposition
E AssertionError: Circuit's text diagram differs from the desired diagram.
E
E Diagram of actual circuit:
E 0: βββY^0.5βββZβββMS(0.25Ο)βββY^-0.5βββS^-1βββ
E β
E 1: βββββββββββββββMS(0.25Ο)βββX^-0.5ββββββββββ
E
E Desired text diagram:
E 0: βββY^0.5βββZβββMS(0.25Ο)βββPhasedX(-0.5)^0.5βββS^-1βββ
E β
E 1: βββββββββββββββMS(0.25Ο)βββX^-0.5βββββββββββββββββββββ
E
E Highlighted differences:
E 0: βββY^0.5βββZβββMS(0.25Ο)ββββββββββββββββββββββββββββββ
E β
E 1: βββββββββββββββMS(0.25Ο)βββX^-0.5βββββββββββββββββββββ
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Ion Concentration in Solutions From Molarity, Chemistry ...
This chemistry video tutorial explains how to calculate the ion concentration in solutions from molarity. This video contains plenty ofΒ ...
Read more >Spectra 5000.pdf - U.S. Naval Research Laboratory
Simultaneous Optical Beam Forming for Phased-Array Applications ... pumping a silica fiber that has been infused with rare earth ions of holmium.
Read more >Solubility Product Constants, K sp
Since the equilibrium constant refers to the product of the concentration of the ions that are present in a saturated solution of an...
Read more >Calibration and Control of Advanced Ultrasonic Array ...
Phased array technology provides increased exibility relative to single element monolithic transducers and the development of controlling hardware with largeΒ ...
Read more >Impact of A-Site Cation Deficiency on Charge Transport in La0 ...
The electrical conductivity of La0.5βxSr0.5FeO3βΞ΄, investigated as a function of the nominal cation deficiency in the A-sublattice, x,Β ...
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 Free
Top 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
If you try to construct a
PhasedX(-0.5)^0.5
cirq will recognize that as aY^-0.5
and return that instead, but this relies on the -0.5 in the PhasedX passing a float equality comparison, so it isnβt too terribly surprising that floating point comparisons are causing system dependent differences. What seems to matter in this test is whether the circuits produced are equivalent and whether they pass thevalidate_circuit
method ofion_device
. I rewrote the tests with this in mind and they pass so Iβll put in a PR for it.@mlihc15 Yeah, this probably doesnβt have to do with the rendering because the only problem we seem to be having here is
Y^-0.5
not being converted toPhasedX(-0.5)^0.5
. This seems to be related to Windows somehow.