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.

Phase out SupportsPhase protocol

See original GitHub issue

The use case I have in mind is defining this protocol for SWAP. This is useful, for instance, for the EjectZ optimizer because one can pass a Z gate through a SWAP as follows:

0: ───Z^theta───×───
                │
1: ─────────────×───

=

0: ───×─────────────
      │
1: ───×───Z^theta───

So I think the phase_by function signature should be changed from

def phase_by(val: Any,
             phase_turns: float,
             qubit_index: int,
             default: TDefault = RaiseTypeErrorIfNotProvided):

to

def phase_by(val: Any,
             phase_turns: float,
             qubit_index: int=None,
             qubits: Sequence[cirq.Qid]=None,
             phased_qubit: cirq.Qid=None,
             default: TDefault = RaiseTypeErrorIfNotProvided):

Then phase_by for SWAP would return an OP_TREE.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
kevinsungcommented, May 12, 2020

@dabacon I think what happened was that we discussed this issue during a Cirq sync and then decided to instead remove the SupportsPhase protocol using the plan in @mpharrigan’s comment. Then I changed the title of this issue.

0reactions
dstrain115commented, Apr 6, 2022

It was decided to keep this protocol after all. The consensus in cirq cync was that this didn’t really affect anyone negatively and did provide some small value, so that we would keep it in.

The above functionality to propagate Z’s through swaps had already been added to EjectZ.

Closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Phaseout of Class II Ozone-Depleting Substances | US EPA
In 1993, EPA established the phaseout framework and the "worst-first" approach, which focused first on HCFC-22, HCFC-141b, and HCFC-142b because ...
Read more >
Enhanced Phase II Detoxification Contributes to Beneficial ...
The DR procedure up-regulates phase II detoxification enzymes through the Nrf-2 pathway, and the products of this phase II metabolism were detected using...
Read more >
Phase-amplitude coupling supports phase coding in human ...
Electrocorticography (ECoG) reveals that phase-amplitude coupling relates to phase-dependent coding in the human brain.
Read more >
Accrual Experience of National Cancer Institute Cooperative ...
The Cancer Therapy Evaluation Program (CTEP) of the National Cancer Institute (NCI) supports phase III clinical trials primarily through the ...
Read more >
[MS-PEAP]: Initialization - Microsoft Learn
This occurs when an EAP-enabled protocol (such. ... be initialized to TRUE, if the PEAP method implementation supports phase 2 fragmentation ...
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