コード例 #1
0
 def circuit(x=None):
     SqueezingEmbedding(features=x,
                        wires=range(n_wires),
                        method='phase',
                        c=1)
     Beamsplitter(pi / 2, 0, wires=[0, 1])
     SqueezingEmbedding(features=[0, 0],
                        wires=range(n_wires),
                        method='phase',
                        c=1)
     return [
         qml.expval(qml.NumberOperator(wires=0)),
         qml.expval(qml.NumberOperator(wires=1))
     ]
コード例 #2
0
 def circuit(x=None):
     SqueezingEmbedding(features=x,
                        wires=range(n_wires),
                        method='phase',
                        c=1)
     Beamsplitter(pi / 2, 0, wires=[0, 1])
     SqueezingEmbedding(features=[0, 0],
                        wires=range(n_wires),
                        method='phase',
                        c=1)
     return [
         qml.expval.MeanPhoton(wires=0),
         qml.expval.MeanPhoton(wires=1)
     ]
コード例 #3
0
 def circuit(x=None):
     SqueezingEmbedding(features=x,
                        wires=range(n_wires),
                        method='amplitude',
                        c=1)
     return [
         qml.expval(qml.NumberOperator(wires=0)),
         qml.expval(qml.NumberOperator(wires=1))
     ]
コード例 #4
0
 def circuit(x=None):
     SqueezingEmbedding(features=x,
                        wires=range(n_wires),
                        method='amplitude',
                        c=1)
     return [
         qml.expval.MeanPhoton(wires=0),
         qml.expval.MeanPhoton(wires=1)
     ]
コード例 #5
0
 def circuit(x=None):
     SqueezingEmbedding(features=x, wires=[0, 1])
     return qml.expval(qml.X(0))
コード例 #6
0
 def circuit(x=None):
     SqueezingEmbedding(features=x, wires=range(n_wires), method='A')
     return [qml.expval(qml.X(i)) for i in range(n_wires)]
コード例 #7
0
 def circuit(x=None):
     SqueezingEmbedding(features=x, wires=3, method='A')
     return qml.expval(qml.X(0))