Why does `ControlledGate` have a notion of qubits
See original GitHub issueControlledGate.control_qubits
is a tuple of Qid
(or None
s). I thought “gates” don’t have qubits and that that is reserved for Operation
s.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Controlled NOT gate
Any quantum circuit can be simulated to an arbitrary degree of accuracy using a combination of CNOT gates and single qubit rotations. The...
Read more >ControlledGate
If the gate has open controls, as determined from self.ctrl_state , the returned definition is conjugated with X without changing the internal _definition...
Read more >Adding A Control To A Quantum-Gate | by Frank Zickert
When we entangle two qubits, we can refine the behavior of the X-gate. ... qubit is |0⟩ because in this case, the CNOT-gate...
Read more >Controlled Gate - an overview
1.4 Quantum Gates and QIP. In quantum mechanics, the primitive undefined concepts are physical system, observable, and state. The concept of state has...
Read more >Why is the action of controlled-Z unaltered by exchanging ...
If we have an arbitrary two qubit state: |ψ⟩=a|00⟩+b|01⟩+c|10⟩+d|11⟩. then after applying CZ1→2 controlled from the first qubit we ...
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 can have partially specified qubits, I’m led to ask why bother having a difference between
Gate
andOperation
at all? There could be one object that has any of its qubits specified or not. If all of them are there, it would be similar to anOperation
. If none of them are there, it would be similar to (most)Gate
s.Earlier versions of pyquil provided first-class support for partial specification of qubits for each gate/operation. I ripped that out since people typically didn’t use it (especially for NISQ algorithms) and in special cases you could use closures (at the python language level) for the same effect.
The original reason for going this route was to have the flexibility of calling control(GateX, my_control_qubits) to generate a ControlledGate where you can specify the qubits GateX uses (and also some more controls) later. The assumption was that control qubits might be used differently than “regular” qubits and having an option to pre-specify some controls without being asked to resolve the underlying Gate to an Operation might come in handy.
But if in the subsequent months no such use case has shown up, cleaning up the additional complexity is probably a good idea.