question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

instability in kak decomposition

See original GitHub issue

In some cases the kak decomposition appears to have an instability in the sign of the ZZ coefficient. Consider the following example:

a, b = cirq.LineQubit(0), cirq.LineQubit(1)

theta = 0.3
circuit_1 = cirq.Circuit()
circuit_1.append(cirq.ISWAP.on(a, b))
circuit_1.append(
    cirq.ZZPowGate(exponent=2 * theta / numpy.pi, global_shift=-0.5).on(a, b))
print(cirq.kak_decomposition(cirq.unitary(circuit_1)).interaction_coefficients)

theta += 0.001
circuit_2 = cirq.Circuit()
circuit_2.append(cirq.ISWAP.on(a, b))
circuit_2.append(
    cirq.ZZPowGate(exponent=2 * theta / numpy.pi, global_shift=-0.5).on(a, b))
print(cirq.kak_decomposition(cirq.unitary(circuit_2)).interaction_coefficients)

print(numpy.amax(numpy.absolute(cirq.unitary(circuit_1) - cirq.unitary(circuit_2))))

returns

(0.7853981633974483, 0.7853981633974483, -0.2999999999999998)
(0.7853981633974482, 0.7853981633974482, 0.30099999999999993)
0.0009999999583333466

And thus we see that despite the fact the unitaries are very similar, the kak decomposition gives a seemingly random sign on the ZZ interaction coefficient. Is this a bug?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:48 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
vtomolecommented, May 21, 2019

@Strilanc I’m currently stepping through the bad and good machine at the moment.

0reactions
Strilanccommented, Jun 27, 2019

I asked @babbush and he said it’s no longer blocking him, therefore it’s good to close.

and… clo-

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Introduction to Cartan's KAK Decomposition for QC ...
In this paper, we give a complete and rigorous proof of this special case of Cartan's Decomposition.
Read more >
qiskit.quantum_info.synthesis.two_qubit_decompose
pylint: disable=invalid-name """ Expand 2-qubit Unitary operators into an equivalent decomposition over SU(2)+fixed 2q basis gate, using the KAK method.
Read more >
Using Karhunen–Loéve decomposition and artificial neural ...
The KL decomposition, for data compression and feature identification, ... The instability of slow, immiscible, viscous liquid–liquid displacements in ...
Read more >
Error rate reduction of single-qubit gates via noise-aware ...
This paper presents a pathway to using information about noise levels and quantum state distributions to significantly reduce error rates ...
Read more >
Nonequilibrium and morphological characterizations of ...
We investigate the effects of viscosity and heat conduction on the onset and growth of Kelvin–Helmholtz instability (KHI) via an efficient ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found