-
Notifications
You must be signed in to change notification settings - Fork 25
Description
I am trying to implement a networking simulation to generate a certain stabiliser state in the Clifford formalism. As part of the simulation, I need to perform a CNOT gate with the target qubit being part of a Bell pair, as in
apply!((network[ri,q1], network[ri,1]), QuantumSavory.QuantumClifford.sCNOT) ,
where network was set up in the Clifford representation, network[rj,1] is entangled with network[ri,1], and network[ri,q1] is supposed to be the control. This yields the following error:
LoadError: An attempt was made to measure a projection observable while using Clifford representation for the qubits. However, the qubits that are being observed are entangled with other qubits. Currently this is not supported. Consider tracing out the extra qubits or using Pauli observables that do not suffer from this embedding limitation. Message us on the issue tracker if you want this functionality implemented.
I am unsure if there is an obvious fix, but since the error message explicitly suggests to mention this feature request here, I was wondering whether an implementation of entangled qubit measurements in the Clifford regime would be possible. If there is a simpler fix that I haven't considered, I would be happy to hear about it!
For context, the code I am working with the following code setup:
@resumable function bell_pair(sim, network, ri, rj)
eprot = EntanglerProt(sim, network, ri, rj; pairstate=noisy_pair, chooseslotA=1, chooseslotB=1, rounds=1, success_prob=1.)
@process eprot()
end
@resumable function apply_remote_CNOT(sim, network, ri, rj, q1, q2)
[...]
# Create Bell Pair between first qubits of registers i and j
@process bell_pair(sim, network, ri, rj)
[...]
# Perform CNOT telegate between qubits q1 and q2
apply!((network[ri,q1], network[ri,1]), QuantumSavory.QuantumClifford.sCNOT)
@yield timeout(sim, two_qubit_gate_execution_time)
m1 = project_traceout!(network[ri,1], Z)
@yield timeout(sim, projective_measurement_time)
if m1 == 2
apply!(network[rj,1], X)
@yield timeout(sim, single_qubit_gate_execution_time)
end
# Teleported CNOT Gate
[...]
end
@resumable function circuit(sim, network)
initialize!(...)
apply!(...)
[...]
**@yield @process apply_remote_CNOT(sim, network, 1, 2, 5, 2)**
[...]
end
sim, network = simulation_setup(sizes, T2; representation = CliffordRepr)
@process circuit(sim, network)
For some time, I thought the error came from the project_traceout! call, but it seems that the CNOT apply! call is the root.
Thank you!