 been generated by DOcplex
    \ ENCODING=ISO-8859-1
    \Problem name: Small Crop-Yield
    
    Maximize
     obj: 3 Wheat + 3 Maize + [ - 4 Wheat^2 + 2 Wheat*Maize - 4 Maize^2 ]/2
    Subject To
    
    Bounds
           Wheat <= 2
           Maize <= 2
    
    Generals
     Wheat Maize
    End
    


Here we verify that our small crop-yield problem requires only 4 qubits.


```python
# Estimate the number of qubits required
ising_operations_small, _ = (
    QuadraticProgramToQubo()
   .convert(
        cropyield_small,
    )
   .to_ising()
)
print(f"Number of qubits required is {ising_operations_small.num_qubits}")
```

    Number of qubits required is 4


### Exercise 1d: Submitting a job to a real quantum computer

Now that we know the problem can be run on our chosen device, we can execute the VQE algorithm. In this case we will set the optimizer, with a maximum number of iterations of 1, so that we do not occupy the device for too long. Our answer will be incorrect, but we only want to see how to send a quantum program to a real quantum computer.


```python
# Create our optimizer
optimizer = COBYLA(maxiter=1)

## Get result from real device with VQE
vqe_result_real, vqe_eval_count_real = get_VQE_solution_for(
    cropyield_small, quantum_instance_real, optimizer=optimizer
)
```

    /opt/conda/lib/python3.8/site-packages/qiskit/utils/run_circuits.py:695: UserWarning: max_credits is not a recognized runtime option and may be ignored by the backend.
      return backend.run(circuits, **run_kwargs)


Qiskit uses `jobs` to track computations and their results on remote devices and simulators. We can query the backend object for the jobs it received, which would be those created by the VQE algorithm.


```python
# Retrieve the VQE job sent
job_real = backend_real.jobs()[0]

print(f"VQE job created at {job_real.creation_date()} and has a job id of {job_real.job_id()}")
```

    VQE job created at 2021-09-09 22:44:00.308000+00:00 and has a job id of 613a8e3001ea11d264c2e51e


Put the job id for your the above job into the cell below and execute the code cell.


```python
from qc_grader import grade_ex1d

job_id = '613a8e3001ea11d264c2e51e'

grade_ex1d(job_id)
```

    Submitting your answer for ex1/partD. Please wait...
    Congratulations 🎉! Your answer is correct and has been submitted.


You have now completed the first lab of the IBM Quantum Challenge Africa 2021! Make sure that you are on the [Qiskit Slack channel](https://ibm.co/Africa_Slack) so you can ask questions and talk to other participants. There are two more labs left in the challenge, which are more difficult than this introductory lab, covering quantum computing for finance and HIV.

## References

[1] A. A. Nel, ‘Crop rotation in the summer rainfall area of South Africa’, South African Journal of Plant and Soil, vol. 22, no. 4, pp. 274–278, Jan. 2005, doi: 10.1080/02571862.2005.10634721.

[2] H. Ritchie and M. Roser, ‘Crop yields’, Our World in Data, 2013, [Online]. Available: https://ourworldindata.org/crop-yields.

[3] G. Brion, ‘Controlling Pests with Plants: The power of intercropping’, UVM Food Feed, Jan. 09, 2014. https://learn.uvm.edu/foodsystemsblog/2014/01/09/controlling-pests-with-plants-the-power-of-intercropping/ (accessed Feb. 15, 2021).

[4] N. O. Ogot, J. O. Pittchar, C. A. O. Midega, and Z. R. Khan, ‘Attributes of push-pull technology in enhancing food and nutrition security’, African Journal of Agriculture and Food Security, vol. 6, pp. 229–242, Mar. 2018.


```python
import qiskit.tools.jupyter

%qiskit_version_table
%qiskit_copyright
```


<h3>Version Information</h3><table><tr><th>Qiskit Software</th><th>Version</th></tr><tr><td><code>qiskit-terra</code></td><td>0.18.1</td></tr><tr><td><code>qiskit-aer</code></td><td>0.8.2</td></tr><tr><td><code>qiskit-ignis</code></td><td>0.6.0</td></tr><tr><td><code>qiskit-ibmq-provider</code></td><td>0.16.0</td></tr><tr><td><code>qiskit-aqua</code></td><td>0.9.4</td></tr><tr><td><code>qiskit</code></td><td>0.29.0</td></tr><tr><td><code>qiskit-nature</code></td><td>0.1.5</td></tr><tr><td><code>qiskit-finance</code></td><td>0.2.0</td></tr><tr><td><code>qiskit-optimization</code></td><td>0.2.1</td></tr><tr><td><code>qiskit-machine-learning</code></td><td>0.2.0</td></tr><tr><th>System information</th></tr><tr><td>Python</td><td>3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05) 
[GCC 9.3.0]</td></tr><tr><td>OS</td><td>Linux</td></tr><tr><td>CPUs</td><td>8</td></tr><tr><td>Memory (Gb)</td><td>31.400043487548828</td></tr><tr><td colspan='2'>Wed Sep 08 20:29:02 2021 UTC</td></tr></table>



<div style='width: 100%; background-color:#d5d9e0;padding-left: 10px; padding-bottom: 10px; padding-right: 10px; padding-top: 5px'><h3>This code is a part of Qiskit</h3><p>&copy; Copyright IBM 2017, 2021.</p><p>This code is licensed under the Apache License, Version 2.0. You may<br>obtain a copy of this license in the LICENSE.txt file in the root directory<br> of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.<p>Any modifications or derivative works of this code must retain this<br>copyright notice, and modified files need to carry a notice indicating<br>that they have been altered from the originals.</p></div>

Well it seems like (from further context) that they became uncomfortable when the lady turned it into raceplay without the other participants consent when it actually had nothing to do with race 

They didn't love it because the power dynamic they had been roleplaying wasn't based on race until she made it like that

However she isn't in the wrong either because it also seems like the host of the event didn't make it clear enough exactly what kind of content would be at this dungeon (multiple activities) so when she was unwillingly subjected to a slave dynamic without *her* consent she got quite rightly offended

Lack of consent all round, nobodies happy and the responsibility is ultimately with the host in my opinion. 

It's okay to roleplay. The participants weren't wrong in their activities and she wasn't wrong to be angry though her ire should have perhaps been directed elsewhereBuying a home is exciting, but stressful, especially if it is your first house. We want you to be comfortable, confident, and fully informed as you prepare for and make your purchase.
We’ll coach you through each stage of what feels like a complicated process. From shopping for a home and navigating loans to preparing for closing and everything in between, we’re your partner along every