Phase out SupportsPhase protocol
See original GitHub issueThe 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:
- Created 4 years ago
- Comments:9
Top 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 >
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
@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.
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.