Skip to content

Flake in two_qubit_to_fsim_test #5569

Closed
@daxfohl

Description

@daxfohl

Description of the issue

Flake in cirq-core/cirq/transformers/analytical_decompositions/two_qubit_to_fsim_test.py::test_decompose_to_diagonal_and_circuit[v1]

Seems to stem from #5426, so just need to up the tolerance.

How to reproduce the issue

See https://github.com/quantumlib/Cirq/runs/6993904987?check_suite_focus=true for an example.

E         >       cirq.testing.assert_allclose_up_to_global_phase(circuit_unitary, v, atol=1e-5)
E         E       AssertionError: 
E         E       Not equal to tolerance rtol=1e-07, atol=1e-05
E         E       
E         E       Mismatched elements: 12 / 16 (75%)
E         E       Max absolute difference: 4.1635845e-05
E         E       Max relative difference: 0.00025732
E         E        x: array([[-0.231313+0.686977j, -0.513628-0.081974j,  0.43493 -0.011298j,  0.003388+0.121329j],
E         E              [-0.089319+0.418467j,  0.788371+0.j      ,  0.305137-0.08776j , -0.054049-0.302731j],
E         E              [ 0.234581-0.350901j,  0.154714-0.047489j,  0.711612+0.109468j,  0.119338+0.512868j],
E         E              [ 0.1[555](https://github.com/quantumlib/Cirq/runs/6993904987?check_suite_focus=true#step:5:556)18-0.298529j, -0.285906+0.001912j,  0.430706+0.077562j, -0.215[557](https://github.com/quantumlib/Cirq/runs/6993904987?check_suite_focus=true#step:5:558)-0.752968j]], dtype=complex64)
E         E        y: array([[-0.231311+0.686961j, -0.513642-0.081955j,  0.434942-0.011303j,  0.003397+0.121333j],
E         E              [-0.089324+0.418471j,  0.788376+0.j      ,  0.305161-0.087726j, -0.054053-0.302698j],
E         E              [ 0.23458 -0.350935j,  0.154687-0.047458j,  0.711607+0.109468j,  0.119334+0.512863j],
E         E              [ 0.155508-0.298527j, -0.285893+0.001917j,  0.430695+0.077542j, -0.215557-0.752984j]], dtype=complex64)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions